Add things to shut tests up

This commit is contained in:
Patrick O'brien 2016-09-10 03:35:32 +10:00
parent 419f2760c7
commit f14301de7b
2 changed files with 17 additions and 2 deletions

View file

@ -96,6 +96,21 @@ func (m testMockDriver) PrimaryKeyInfo(schema, tableName string) (*PrimaryKey, e
}[tableName], nil }[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) { func TestTables(t *testing.T) {
t.Parallel() t.Parallel()

View file

@ -47,7 +47,7 @@ func SchemaTable(driver string, schema string, table string) string {
} }
// IdentQuote attempts to quote simple identifiers in SQL tatements // 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" { if strings.ToLower(s) == "null" {
return s return s
} }
@ -79,7 +79,7 @@ func IdentQuote(s string) string {
} }
// IdentQuoteSlice applies IdentQuote to a slice. // IdentQuoteSlice applies IdentQuote to a slice.
func IdentQuoteSlice(s []string) []string { func IdentQuoteSlice(lq byte, rq byte, s []string) []string {
if len(s) == 0 { if len(s) == 0 {
return s return s
} }