xorm/core
Lunny Xiao 40a135948b New Prepare useage (#2061)
Fix #2060, Three ways to use the `Prepare`.

The first

```go
engine.Prepare().Where().Get()
```

The second

```go
sess := engine.NewSession()
defer sess.Close()

sess.Prepare().Where().Get()

sess.Prepare().Where().Get()
```

The third
```go
sess := engine.NewSession()
defer sess.Close()

sess.Begin()

sess.Prepare().Where().Get()

sess.Prepare().Where().Get()

sess.Commit()
```

Or

```go
sess := engine.NewSession()
defer sess.Close()

sess.Begin()

sess.Prepare().Insert()

sess.Prepare().Insert()

sess.Commit()
```

Reviewed-on: xorm/xorm#2061
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-10-20 08:53:30 +08:00
..
db_test.go Fix comments (#1896) 2021-04-12 16:00:07 +08:00
db.go Fix comments (#1896) 2021-04-12 16:00:07 +08:00
error.go Merge core package back into the main repository and split into serval sub packages. (#1543) 2020-02-24 08:53:18 +00:00
interface.go Don't keep db on dialects (#1623) 2020-03-24 02:19:24 +00:00
rows.go Fix comments (#1896) 2021-04-12 16:00:07 +08:00
scan.go Fix comments (#1896) 2021-04-12 16:00:07 +08:00
stmt.go New Prepare useage (#2061) 2021-10-20 08:53:30 +08:00
tx.go Fix comments (#1896) 2021-04-12 16:00:07 +08:00