Add things to shut tests up
This commit is contained in:
parent
419f2760c7
commit
f14301de7b
2 changed files with 17 additions and 2 deletions
|
@ -96,6 +96,21 @@ func (m testMockDriver) PrimaryKeyInfo(schema, tableName string) (*PrimaryKey, e
|
|||
}[tableName], nil
|
||||
}
|
||||
|
||||
// RightQuote is the quoting character for the right side of the identifier
|
||||
func (m *testMockDriver) RightQuote() byte {
|
||||
return '"'
|
||||
}
|
||||
|
||||
// LeftQuote is the quoting character for the left side of the identifier
|
||||
func (m *testMockDriver) LeftQuote() byte {
|
||||
return '"'
|
||||
}
|
||||
|
||||
// IndexPlaceholders returns true to indicate fake support of indexed placeholders
|
||||
func (m *testMockDriver) IndexPlaceholders() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func TestTables(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ func SchemaTable(driver string, schema string, table string) string {
|
|||
}
|
||||
|
||||
// IdentQuote attempts to quote simple identifiers in SQL tatements
|
||||
func IdentQuote(s string) string {
|
||||
func IdentQuote(lq byte, rq byte, s string) string {
|
||||
if strings.ToLower(s) == "null" {
|
||||
return s
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ func IdentQuote(s string) string {
|
|||
}
|
||||
|
||||
// IdentQuoteSlice applies IdentQuote to a slice.
|
||||
func IdentQuoteSlice(s []string) []string {
|
||||
func IdentQuoteSlice(lq byte, rq byte, s []string) []string {
|
||||
if len(s) == 0 {
|
||||
return s
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue