Documentation
¶
Index ¶
- type Entity
- func (e *Entity) Close() error
- func (e *Entity) CommitTransaction(tx *sql.Tx) error
- func (e *Entity) Exec(query string, args ...interface{}) (sql.Result, error)
- func (e *Entity) ExecuteQuery(tx *sql.Tx, query string, args ...interface{}) (sql.Result, error)
- func (e *Entity) Insert(query string, args ...interface{}) (sql.Result, error)
- func (e *Entity) InsertMultiple(query string, bindVar string, noOfParams int, args ...interface{}) (sql.Result, error)
- func (e *Entity) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (e *Entity) QueryRow(query string, args ...interface{}) *sql.Row
- func (e *Entity) RollbackTransaction(tx *sql.Tx) error
- func (e *Entity) StartTransaction() (*sql.Tx, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
func (*Entity) ExecuteQuery ¶
func (*Entity) InsertMultiple ¶
func (e *Entity) InsertMultiple(query string, bindVar string, noOfParams int, args ...interface{}) (sql.Result, error)
This function is used to insert multiple values in one query.
@params:
query: a query containing bindVar string bindVar: its basically used to create a query, eg. `Insert INTO abc (column1, column2, column3) VALUES $$`. `$$` is the bindVar here noOfParams: 3 in the above example. Its the number of columns to insert args: list of arguments for the query.
Click to show internal directories.
Click to hide internal directories.