Documentation ¶
Index ¶
- func InitializePostgresClient() (pb.PostgresClient, error)
- type 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 string) isql.Database
- func (d Database) InsertMany(documents []interface{}) ([]string, error)
- func (d Database) InsertOne(document interface{}) (id string, err error)
- func (d Database) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (d Database) Table(name string) isql.Database
- func (d Database) UpdateOne(document interface{}) error
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.