|
@@ -31,7 +31,7 @@ var _ = Describe("gosql", func() {
|
|
// // Note: you need to up MySQL server for this test case
|
|
// // Note: you need to up MySQL server for this test case
|
|
// Context("for MySQL", func() {
|
|
// Context("for MySQL", func() {
|
|
// It("open connection, migrate and select data", func() {
|
|
// It("open connection, migrate and select data", func() {
|
|
- // db, err := gosql.Open("mysql://root:root@127.0.0.1:3306/gosql", migrationsDir)
|
|
|
|
|
|
+ // db, err := gosql.Open("mysql://root:root@127.0.0.1:3306/gosql", migrationsDir, false)
|
|
// Expect(err).To(Succeed())
|
|
// Expect(err).To(Succeed())
|
|
|
|
|
|
// err = db.QueryRow(ctx, sql, 1).Scan(&id, &name)
|
|
// err = db.QueryRow(ctx, sql, 1).Scan(&id, &name)
|
|
@@ -51,7 +51,7 @@ var _ = Describe("gosql", func() {
|
|
// // Note: you need to up PostgreSQL server for this test case
|
|
// // Note: you need to up PostgreSQL server for this test case
|
|
// Context("for PostgreSQL", func() {
|
|
// Context("for PostgreSQL", func() {
|
|
// It("open connection, migrate and select data", func() {
|
|
// It("open connection, migrate and select data", func() {
|
|
- // db, err := gosql.Open("postgres://root:root@127.0.0.1:5432/gosql?sslmode=disable", migrationsDir)
|
|
|
|
|
|
+ // db, err := gosql.Open("postgres://root:root@127.0.0.1:5432/gosql?sslmode=disable", migrationsDir, false)
|
|
// Expect(err).To(Succeed())
|
|
// Expect(err).To(Succeed())
|
|
|
|
|
|
// err = db.QueryRow(ctx, sql, 1).Scan(&id, &name)
|
|
// err = db.QueryRow(ctx, sql, 1).Scan(&id, &name)
|
|
@@ -74,7 +74,7 @@ var _ = Describe("gosql", func() {
|
|
Expect(err).To(Succeed())
|
|
Expect(err).To(Succeed())
|
|
f.Close()
|
|
f.Close()
|
|
|
|
|
|
- db, err := gosql.Open("sqlite://"+f.Name(), migrationsDir)
|
|
|
|
|
|
+ db, err := gosql.Open("sqlite://"+f.Name(), migrationsDir, false)
|
|
Expect(err).To(Succeed())
|
|
Expect(err).To(Succeed())
|
|
|
|
|
|
err = db.QueryRow(ctx, sql, 1).Scan(&id, &name)
|
|
err = db.QueryRow(ctx, sql, 1).Scan(&id, &name)
|