Add SQLBuilder support for SQLite databases.
This commit is contained in:
parent
d197956271
commit
e8f4c2b31b
50 changed files with 5851 additions and 75 deletions
14
sqlite/cast_test.go
Normal file
14
sqlite/cast_test.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package sqlite
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCAST(t *testing.T) {
|
||||
assertSerialize(t, CAST(Float(11.22)).AS("bigint"), `CAST(? AS bigint)`)
|
||||
assertSerialize(t, CAST(Int(22)).AS_TEXT(), `CAST(? AS TEXT)`)
|
||||
assertSerialize(t, CAST(Int(22)).AS_NUMERIC(), `CAST(? AS NUMERIC)`)
|
||||
assertSerialize(t, CAST(String("22")).AS_INTEGER(), `CAST(? AS INTEGER)`)
|
||||
assertSerialize(t, CAST(String("22.2")).AS_REAL(), `CAST(? AS REAL)`)
|
||||
assertSerialize(t, CAST(String("blob")).AS_BLOB(), `CAST(? AS BLOB)`)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue