Documentation ¶
Index ¶
- func New(id common.RegDbID, url string) (common.Database, error)
- func NewInstance(id common.RegDbID, reference *common.Reference, password string) (common.Database, error)
- type Logger
- type PostGres
- func (pg *PostGres) AdaptTable(name string, col any) error
- func (pg *PostGres) Batch(batch string) error
- func (pg *PostGres) BatchSelect(batch string) ([][]interface{}, error)
- func (pg *PostGres) BatchSelectFct(search *common.Query, fct common.ResultFunction) error
- func (pg *PostGres) BeginTransaction() error
- func (pg *PostGres) ByteArrayAvailable() bool
- func (pg *PostGres) Clone() common.Database
- func (pg *PostGres) Close()
- func (pg *PostGres) Commit() error
- func (pg *PostGres) CreateTable(name string, col any) error
- func (pg *PostGres) Delete(name string, remove *common.Entries) (rowsAffected int64, err error)
- func (pg *PostGres) DeleteTable(name string) error
- func (pg *PostGres) EndTransaction(commit bool) (err error)
- func (pg *PostGres) FreeHandler()
- func (pg *PostGres) GetTableColumn(tableName string) ([]string, error)
- func (pg *PostGres) ID() common.RegDbID
- func (pg *PostGres) IndexNeeded() bool
- func (pg *PostGres) Insert(name string, insert *common.Entries) (returning [][]any, err error)
- func (pg *PostGres) Maps() ([]string, error)
- func (pg *PostGres) Open() (dbOpen any, err error)
- func (pg *PostGres) ParseRows(search *common.Query, rows pgx.Rows, f common.ResultFunction) (result *common.Result, err error)
- func (pg *PostGres) ParseStruct(search *common.Query, rows pgx.Rows, f common.ResultFunction) (result *common.Result, err error)
- func (pg *PostGres) Ping() error
- func (pg *PostGres) Query(search *common.Query, f common.ResultFunction) (*common.Result, error)
- func (pg *PostGres) Reference() (string, string)
- func (pg *PostGres) Rollback() error
- func (pg *PostGres) SetCredentials(user, password string) error
- func (pg *PostGres) StartTransaction() (pgx.Tx, context.Context, error)
- func (pg *PostGres) Stream(search *common.Query, sf common.StreamFunction) error
- func (pg *PostGres) URL() string
- func (pg *PostGres) Update(name string, updateInfo *common.Entries) (returning [][]any, rowsAffected int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PostGres ¶
type PostGres struct { common.CommonDatabase // contains filtered or unexported fields }
PostGres instane for PostgresSQL
func (*PostGres) AdaptTable ¶
AdaptTable adapt a new table
func (*PostGres) BatchSelect ¶
BatchSelect batch SQL query in table with values returned
func (*PostGres) BatchSelectFct ¶
BatchSelectFct batch SQL query in table with fct called
func (*PostGres) BeginTransaction ¶
BeginTransaction begin transaction the database connection
func (*PostGres) ByteArrayAvailable ¶
ByteArrayAvailable byte array available in SQL database
func (*PostGres) CreateTable ¶
CreateTable create a new table
func (*PostGres) DeleteTable ¶
DeleteTable delete a table
func (*PostGres) EndTransaction ¶
func (*PostGres) FreeHandler ¶
func (pg *PostGres) FreeHandler()
FreeHandler don't use the driver anymore
func (*PostGres) GetTableColumn ¶
GetTableColumn get table columne names
func (*PostGres) IndexNeeded ¶
IndexNeeded index needed for the SELECT statement value reference
func (*PostGres) ParseStruct ¶
func (*PostGres) SetCredentials ¶
SetCredentials set credentials to connect to database
func (*PostGres) StartTransaction ¶
StartTransaction start transaction
Click to show internal directories.
Click to hide internal directories.