Documentation
¶
Index ¶
- func DBFields(object interface{}) (string, error)
- func DBKeyValuePairs(object interface{}) (string, error)
- func DBPlaceholder(object interface{}) (string, error)
- func DBPlaceholderForIDs(ids []int) string
- func DBValues(object interface{}) ([]interface{}, error)
- func Delete(db *sql.DB, table string, objectID int) error
- func ExecuteQuery(db *sql.DB, query string, args []interface{}) (sql.Result, error)
- func ExecuteRowQuery(db *sql.DB, query string, args []interface{}) (*sql.Rows, error)
- func Insert(db *sql.DB, table string, object interface{}) (*sql.Rows, error)
- func InterfaceInt(ints []int) []interface{}
- func RemoveResource(db *sql.DB, object string, objectID int, resource string, resourceID int) error
- func Resource(db *sql.DB, object string, objectID int, resource string) (*sql.Rows, error)
- func Search(db *sql.DB, table string, name string) (*sql.Rows, error)
- func Select(db *sql.DB, table string, objectIDs []int) (*sql.Rows, error)
- func SetResource(db *sql.DB, object string, objectID int, resource string, resourceID int) error
- func Update(db *sql.DB, table string, objectID int, object interface{}) (*sql.Rows, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBFields ¶
taken from: https://github.com/jmoiron/sqlx/issues/255 DBFields reflects on a struct and returns the values of fields with `db` tags and returns the keys.
func DBKeyValuePairs ¶
DBValues reflects on a struct and returns the values of fields which have a `db` tag.
func DBPlaceholder ¶
DBPlaceholder reflects on a struct and returns a placeholder string for every field which have a `db` tag.
func DBPlaceholderForIDs ¶
func DBValues ¶
func DBValues(object interface{}) ([]interface{}, error)
DBValues reflects on a struct and returns the values of fields which have a `db` tag.
func ExecuteQuery ¶
func ExecuteRowQuery ¶
func InterfaceInt ¶
func InterfaceInt(ints []int) []interface{}
func RemoveResource ¶
func SetResource ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.