postgres

package
v1.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonQuote

func JsonQuote(val interface{}) interface{}

func NewDriver

func NewDriver() jdb.Driver

Types

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

func (*Postgres) ChangePassword

func (s *Postgres) ChangePassword(username, password, confirmation string) error

func (*Postgres) Command

func (s *Postgres) Command(command *jdb.Command) (et.Items, error)

func (*Postgres) Connect

func (s *Postgres) Connect(params et.Json) error

* * Connect * @param params et.Json * @return error *

func (*Postgres) Count

func (s *Postgres) Count(ql *jdb.Ql) (int, error)

func (*Postgres) CreateCore added in v1.0.3

func (s *Postgres) CreateCore() error

func (*Postgres) CreateDatabase

func (s *Postgres) CreateDatabase(name string) error

* * CreateDatabase * @param name string * @return error *

func (*Postgres) CreateModel added in v1.0.3

func (s *Postgres) CreateModel(model *jdb.Model) error

* * CreateModel * @param model *jdb.Model * @return error *

func (*Postgres) CreateSchema added in v1.0.3

func (s *Postgres) CreateSchema(name string) error

func (*Postgres) CreateUser

func (s *Postgres) CreateUser(username, password, confirmation string) error

func (*Postgres) CurrentSerie added in v1.0.3

func (s *Postgres) CurrentSerie(tag string) int64

* * CurrentSerie * @param tag string * @return int64

func (*Postgres) Data added in v1.0.5

func (s *Postgres) Data(sourceFiled, sql string, arg ...any) (et.Items, error)

* * Data * @param source, sql string, arg ...any * @return et.Items, error *

func (*Postgres) DeleteUser

func (s *Postgres) DeleteUser(username string) error

func (*Postgres) Disconnect

func (s *Postgres) Disconnect() error

* * Disconnect * @return error *

func (*Postgres) DropDatabase

func (s *Postgres) DropDatabase(name string) error

* * DropDatabase * @param name string * @return error *

func (*Postgres) DropModel

func (s *Postgres) DropModel(model *jdb.Model) error

* * DropModel * @param model *jdb.Model * @return error *

func (*Postgres) DropSchema

func (s *Postgres) DropSchema(name string) error

func (*Postgres) Exec added in v1.0.3

func (s *Postgres) Exec(sql string, arg ...any) error

* * Exec * @param sql string, arg ...any * @return error *

func (*Postgres) ExecDDL added in v1.0.5

func (s *Postgres) ExecDDL(id, sql string, arg ...any) error

* * ExecDDL * @param id, sql string, arg ...any * @return error *

func (*Postgres) ExistSchema

func (s *Postgres) ExistSchema(name string) (bool, error)

func (*Postgres) Exists

func (s *Postgres) Exists(ql *jdb.Ql) (bool, error)

func (*Postgres) GetSerie added in v1.0.3

func (s *Postgres) GetSerie(tag string) int64

* * GetSerie * @param tag string * @return int64

func (*Postgres) GrantPrivileges

func (s *Postgres) GrantPrivileges(username, database string) error

func (*Postgres) LoadTable added in v1.0.6

func (s *Postgres) LoadTable(model *jdb.Model) (bool, error)

* * LoadTable * @param model *jdb.Model * @return error *

func (*Postgres) Name

func (s *Postgres) Name() string

func (*Postgres) NextCode added in v1.0.3

func (s *Postgres) NextCode(tag, prefix string) string

* * NextCode * @param tag string, prefix string * @return string

func (*Postgres) One added in v1.0.3

func (s *Postgres) One(sql string, arg ...any) (et.Item, error)

* * One * @param sql string, arg ...any * @return et.Item, error *

func (*Postgres) Query

func (s *Postgres) Query(sql string, arg ...any) (et.Items, error)

* * Query * @param sql string, arg ...any * @return et.Items, error *

func (*Postgres) QueryRow added in v1.0.6

func (s *Postgres) QueryRow(query string, dest ...any) (bool, error)

* * QueryRow * @param query string, dest ...any * @return error *

func (*Postgres) SaveModel added in v1.0.7

func (s *Postgres) SaveModel(model *jdb.Model) error

* * SaveModel * @param model *jdb.Model * @return error *

func (*Postgres) Select

func (s *Postgres) Select(ql *jdb.Ql) (et.Items, error)

* * Select * @param ql *jdb.Ql * @return et.Items, error *

func (*Postgres) SetMain

func (s *Postgres) SetMain(params et.Json) error

func (*Postgres) SetSerie added in v1.0.3

func (s *Postgres) SetSerie(tag string, val int) int64

* * SetSerie * @param tag string, val int * @return int64

func (*Postgres) Version

func (s *Postgres) Version() int

* * Version * @return int *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL