github.com/RevenueMonster/sqlike@v1.0.6/sqlike/options/insert_one.go (about)

     1  package options
     2  
     3  // InsertOneOptions :
     4  type InsertOneOptions struct {
     5  	InsertOptions
     6  }
     7  
     8  // InsertOne :
     9  func InsertOne() *InsertOneOptions {
    10  	return &InsertOneOptions{}
    11  }
    12  
    13  // SetMode :
    14  func (opt *InsertOneOptions) SetMode(mode insertMode) *InsertOneOptions {
    15  	opt.Mode = mode
    16  	return opt
    17  }
    18  
    19  // SetDebug :
    20  func (opt *InsertOneOptions) SetDebug(debug bool) *InsertOneOptions {
    21  	opt.Debug = debug
    22  	return opt
    23  }
    24  
    25  // SetOmitFields :
    26  func (opt *InsertOneOptions) SetOmitFields(fields ...string) *InsertOneOptions {
    27  	opt.Omits = fields
    28  	return opt
    29  }
    30  
    31  // // SetOnConflict :
    32  // func (opt *InsertOneOptions) SetOnConflict(src []interface{}) *InsertOneOptions {
    33  // 	return opt
    34  // }