File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,7 @@ type (
189189 TxOption func (* txDesc )
190190)
191191
192+ // TxSettings returns transaction settings
192193func TxSettings (opts ... TxOption ) * TransactionSettings {
193194 s := new (TransactionSettings )
194195 for _ , opt := range opts {
@@ -197,6 +198,7 @@ func TxSettings(opts ...TxOption) *TransactionSettings {
197198 return s
198199}
199200
201+ // BeginTx returns begin transaction control option
200202func BeginTx (opts ... TxOption ) TxControlOption {
201203 return func (d * txControlDesc ) {
202204 s := TxSettings (opts ... )
@@ -214,6 +216,7 @@ func WithTx(t Transaction) TxControlOption {
214216 }
215217}
216218
219+ // CommitTx returns commit transaction control option
217220func CommitTx () TxControlOption {
218221 return func (d * txControlDesc ) {
219222 d .CommitTx = true
@@ -271,6 +274,7 @@ func (t *TransactionControl) Desc() *Ydb_Table.TransactionControl {
271274 return & t .desc
272275}
273276
277+ // TxControl makes transaction control from given options
274278func TxControl (opts ... TxControlOption ) * TransactionControl {
275279 c := new (TransactionControl )
276280 for _ , opt := range opts {
You can’t perform that action at this time.
0 commit comments