From c152d029f2f280b610d91822fbf4a73b4323cc44 Mon Sep 17 00:00:00 2001 From: Harvey Kandola Date: Wed, 21 Nov 2018 11:51:54 +0000 Subject: [PATCH] Add comments --- domain/organization/store.go | 1 - domain/store/context.go | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/domain/organization/store.go b/domain/organization/store.go index 0d7b7003..2c0ff162 100644 --- a/domain/organization/store.go +++ b/domain/organization/store.go @@ -91,7 +91,6 @@ func (s Store) GetOrganizationByDomain(subdomain string) (o org.Organization, er if err == nil { return } - err = nil // match on empty domain AS last resort err = s.Runtime.Db.Get(&o, s.Bind(`SELECT id, c_refid AS refid, diff --git a/domain/store/context.go b/domain/store/context.go index d9a316bf..afa36550 100644 --- a/domain/store/context.go +++ b/domain/store/context.go @@ -26,9 +26,9 @@ type Context struct { // Bind selects query parameter placeholder for given database provider. // -// MySQL uses ?, ?, ? (default for all Documize queries) -// PostgreSQL uses $1, $2, $3 -// MS SQL Server uses @p1, @p2, @p3 +// MySQL uses ?, ?, ? (default for all Documize queries).`` +// PostgreSQL uses $1, $2, $3. +// MS SQL Server uses @p1, @p2, @p3. func (c *Context) Bind(sql string) string { // Default to MySQL. bindParam := sqlx.QUESTION