Documentation ¶
Index ¶
- Variables
- func GetErrorF(errMsg string, err error) error
- type DB
- type PgxDB
- func (db *PgxDB) Close()
- func (db *PgxDB) DoesTableExist(schema, table string) (exist bool)
- func (db *PgxDB) ExecActionQuery(sql string, arguments ...interface{}) (rowsAffected int, err error)
- func (db *PgxDB) GetPGConn() (Conn *pgxpool.Pool, err error)
- func (db *PgxDB) GetQueryBool(sql string, arguments ...interface{}) (result bool, err error)
- func (db *PgxDB) GetQueryInt(sql string, arguments ...interface{}) (result int, err error)
- func (db *PgxDB) GetQueryString(sql string, arguments ...interface{}) (result string, err error)
- func (db *PgxDB) GetQueryStringArr(sql string, arguments ...any) (result []string, err error)
- func (db *PgxDB) GetSpatialVersion() (result string, err error)
- func (db *PgxDB) GetVersion() (result string, err error)
- func (db *PgxDB) Insert(sql string, arguments ...interface{}) (lastInsertId int, err error)
- func (db *PgxDB) IsItSpatial() bool
- type SQLITE3
- func (db *SQLITE3) Close()
- func (db *SQLITE3) DoesTableExist(schema, table string) (exist bool)
- func (db *SQLITE3) ExecActionQuery(sql string, arguments ...interface{}) (rowsAffected int, err error)
- func (db *SQLITE3) GetQueryBool(sql string, arguments ...interface{}) (result bool, err error)
- func (db *SQLITE3) GetQueryInt(sql string, arguments ...interface{}) (result int, err error)
- func (db *SQLITE3) GetQueryString(sql string, arguments ...interface{}) (result string, err error)
- func (db *SQLITE3) GetQueryStringArr(sql string, arguments ...interface{}) (result []string, err error)
- func (db *SQLITE3) GetSpatialVersion() (result string, err error)
- func (db *SQLITE3) GetVersion() (result string, err error)
- func (db *SQLITE3) IsItSpatial() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRecordFound = errors.New("record not found") ErrCouldNotBeCreated = errors.New("could not be created in DB") )
Functions ¶
Types ¶
type DB ¶
type DB interface { ExecActionQuery(sql string, arguments ...interface{}) (rowsAffected int, err error) GetQueryInt(sql string, arguments ...interface{}) (result int, err error) GetQueryBool(sql string, arguments ...interface{}) (result bool, err error) GetQueryString(sql string, arguments ...interface{}) (result string, err error) GetVersion() (result string, err error) GetSpatialVersion() (result string, err error) DoesTableExist(schema, table string) (exist bool) Close() IsItSpatial() bool GetQueryStringArr(sql string, arguments ...interface{}) (result []string, err error) }
DB is the interface for a simple table store.
type PgxDB ¶
func (*PgxDB) Close ¶
func (db *PgxDB) Close()
Close is a postgres helper function to close the connection to the database
func (*PgxDB) DoesTableExist ¶
func (*PgxDB) ExecActionQuery ¶
func (db *PgxDB) ExecActionQuery(sql string, arguments ...interface{}) (rowsAffected int, err error)
ExecActionQuery is a postgres helper function for an action query, returning the numbers of rows affected
func (*PgxDB) GetQueryBool ¶
GetQueryBool is a postgres helper function for a query expecting an integer result
func (*PgxDB) GetQueryInt ¶
GetQueryInt is a postgres helper function for a query expecting an integer result
func (*PgxDB) GetQueryString ¶
func (*PgxDB) GetQueryStringArr ¶
func (*PgxDB) GetSpatialVersion ¶
func (*PgxDB) GetVersion ¶
func (*PgxDB) IsItSpatial ¶
type SQLITE3 ¶
SQLITE3 is a struct to hold the connection to a sqlite3 database
func (*SQLITE3) DoesTableExist ¶
func (*SQLITE3) ExecActionQuery ¶
func (*SQLITE3) GetQueryBool ¶
func (*SQLITE3) GetQueryInt ¶
func (*SQLITE3) GetQueryString ¶
func (*SQLITE3) GetQueryStringArr ¶
func (*SQLITE3) GetSpatialVersion ¶
func (*SQLITE3) GetVersion ¶
func (*SQLITE3) IsItSpatial ¶
Click to show internal directories.
Click to hide internal directories.