aboutsummaryrefslogtreecommitdiff
path: root/lib/sql/sql.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2021-02-05 19:23:49 +0700
committerShulhan <m.shulhan@gmail.com>2021-02-05 19:23:49 +0700
commit8ae6e2f77045d54242141a4238842091b652be1a (patch)
treeacd7c7589addf06acbde3cb93226b6b0a42d7817 /lib/sql/sql.go
parent03e20f3ceb0ee1471ce90a31e8e400ff3f46a84d (diff)
downloadpakakeh.go-8ae6e2f77045d54242141a4238842091b652be1a.tar.xz
sql: sort returned names on ExtractSQLFields sorted in ascending order
This is to make sure that any test that use the package always predictable. While at it, add paramter to change placeholder on ExtractSQLFields.
Diffstat (limited to 'lib/sql/sql.go')
-rw-r--r--lib/sql/sql.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sql/sql.go b/lib/sql/sql.go
index 0d33db51..06cd0d1e 100644
--- a/lib/sql/sql.go
+++ b/lib/sql/sql.go
@@ -11,4 +11,6 @@ package sql
const (
DriverNameMysql = "mysql"
DriverNamePostgres = "postgres"
+
+ DefaultPlaceHolder = "?"
)