New Prepare useage #2061

Merged
lunny merged 2 commits from lunny/fix_prepare_tx into master 2021-10-20 00:53:30 +00:00
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 2021-10-19 12:34:05 +00:00
lunny added 1 commit 2021-10-19 12:34:06 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
c434bb8055
New Prepare useage
lunny added the
kind
feature
label 2021-10-19 12:37:08 +00:00
lunny added this to the 1.3.0 milestone 2021-10-19 12:37:16 +00:00
lunny added 1 commit 2021-10-19 13:35:12 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
ccc5c0abd4
Also fix prepare with exec
lunny merged commit 40a135948b into master 2021-10-20 00:53:30 +00:00
lunny referenced this issue from a commit 2021-10-20 00:53:31 +00:00
lunny deleted branch lunny/fix_prepare_tx 2021-10-20 00:53:31 +00:00
Sign in to join this conversation.
No description provided.