Documentation
¶
Index ¶
- func InitializePostgresClient() (pb.PostgresClient, error)
- type Database
- func (d Database) AllCols() isql.Database
- func (d Database) Columns(s ...string) isql.Database
- func (d Database) DeleteOne(filter ...interface{}) error
- func (d Database) Exec(query string, args ...interface{}) (sql.Result, error)
- func (d Database) FindMany(documents interface{}, filter ...interface{}) error
- func (d Database) FindOne(document interface{}, filter ...interface{}) (bool, error)
- func (d Database) ID(id any) isql.Database
- func (d Database) In(s string, a ...any) isql.Database
- func (d Database) InsertMany(documents []interface{}) ([]int64, error)
- func (d Database) InsertOne(document interface{}) (id int64, err error)
- func (d Database) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (d Database) Sync(...any) error
- func (d Database) Table(name string) isql.Database
- func (d Database) UpdateOne(document interface{}) error
- func (d Database) Where(s string, a ...any) isql.Database
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializePostgresClient ¶
func InitializePostgresClient() (pb.PostgresClient, error)
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabase(ctx context.Context, client pb.PostgresClient) Database
func (Database) InsertMany ¶
TODO: Implement in a more efficient way
Click to show internal directories.
Click to hide internal directories.