New Prepare useage #2061

Merged
lunny merged 2 commits from lunny/fix_prepare_tx into master 3 months ago
lunny commented 3 months ago
Owner

Fix #2060, Three ways to use the Prepare.

The first

engine.Prepare().Where().Get()

The second

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

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

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

The third

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

sess.Begin()

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

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

sess.Commit()

Or

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

sess.Begin()

sess.Prepare().Insert()

sess.Prepare().Insert()

sess.Commit()
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() ```
lunny added the
kind/breaking
label 3 months ago
lunny added 1 commit 3 months ago
c434bb8055
New Prepare useage
lunny added the
kind/feature
label 3 months ago
lunny added this to the 1.3.0 milestone 3 months ago
lunny added 1 commit 3 months ago
ccc5c0abd4
Also fix prepare with exec
lunny merged commit 40a135948b into master 3 months ago
lunny referenced this issue from a commit 3 months ago
lunny deleted branch lunny/fix_prepare_tx 3 months ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 40a135948b.
Sign in to join this conversation.
Loading…
There is no content yet.