支持informix

This commit is contained in:
maixl
2024-03-19 10:50:29 +08:00
parent 3706314572
commit 2d88cfe780
10 changed files with 117 additions and 6 deletions
+16
View File
@@ -212,6 +212,22 @@ func ExampleInsertBuilder_subSelect_oracle() {
// [1]
}
func ExampleInsertBuilder_subSelect_informix() {
ib := Informix.NewInsertBuilder()
ib.InsertInto("demo.user")
ib.Cols("id", "name")
sb := ib.Select("id", "name").From("demo.test")
sb.Where(sb.EQ("id", 1))
sql, args := ib.Build()
fmt.Println(sql)
fmt.Println(args)
// Output:
// INSERT INTO demo.user (id, name) SELECT id, name FROM demo.test WHERE id = :1
// [1]
}
func ExampleInsertBuilder_NumValue() {
ib := NewInsertBuilder()
ib.InsertInto("demo.user")