Skip to content
MR.Fan edited this page Aug 31, 2020 · 1 revision

Design:

For more goroutine can use the api safty.

Split the db operation.

  1. get connection from pool.
  2. parse the Executer/Query.
  3. run the sql(s) .
  4. fetch the result into the out parameter.
  5. return the connection back to the pool.

the Interface BaseOp the base method Error() error, Raw()

ExecuteOp the update/remove/create sql

QueryOp the select sql

Clone this wiki locally