Documentation ¶
Index ¶
- Variables
- func Delete(db *DB, mappers ...DeleteMapper) error
- func Insert(db *DB, mappers ...InsertMapper) error
- func SelectMultiple[T any](db *DB, mc QueryMapper[T]) ([]T, error)
- func SelectOne[T any](db *DB, mc QueryMapper[T]) (T, error)
- func Update(db *DB, mappers ...UpdateMapper) error
- type APP
- type CLOUD_MACHINE_METADATA
- type CLOUD_PROVIDER
- type DB
- type DeleteMapper
- type InsertMapper
- type MACHINE
- type Notifier
- type QueryMapper
- type USER
- type USER_DEVICE_METADATA
- type UpdateMapper
Constants ¶
This section is empty.
Variables ¶
View Source
var Instance *doltswarm.DB
Functions ¶
func Delete ¶
func Delete(db *DB, mappers ...DeleteMapper) error
func Insert ¶
func Insert(db *DB, mappers ...InsertMapper) error
Insert inserts a new entry in the database using the sq query builder
func SelectMultiple ¶
func SelectMultiple[T any](db *DB, mc QueryMapper[T]) ([]T, error)
func Update ¶
func Update(db *DB, mappers ...UpdateMapper) error
Types ¶
type APP ¶
type APP struct { sq.TableStruct `sq:"apps"` ID sq.StringField `ddl:"notnull primarykey"` NAME sq.StringField `ddl:"notnull index"` INSTALLER_REF sq.StringField `ddl:"notnull"` INSTANCE_ID sq.StringField `ddl:"notnull"` DESIRED_STATUS sq.StringField `ddl:"notnull"` PERSISTENCE sq.BooleanField `ddl:"notnull"` PUBLIC_KEY sq.StringField `ddl:"notnull index"` }
type CLOUD_MACHINE_METADATA ¶
type CLOUD_MACHINE_METADATA struct { sq.TableStruct `sq:"cloud_machines_metadata"` ID sq.StringField `ddl:"notnull primarykey"` CLOUD_ID sq.StringField `ddl:"notnull"` PUBLIC_IP sq.StringField `ddl:"notnull"` LOCATION sq.StringField `ddl:"notnull"` ARCHITECTURE sq.StringField `ddl:"notnull"` PUBLIC_KEY sq.StringField `ddl:"notnull index"` }
type CLOUD_PROVIDER ¶
type CLOUD_PROVIDER struct { sq.TableStruct `sq:"cloud_providers"` ID sq.StringField `ddl:"notnull primarykey"` NAME sq.StringField `ddl:"notnull index"` TYPE sq.StringField `ddl:"notnull"` AUTH sq.JSONField `ddl:"notnull"` }
type DeleteMapper ¶
type DeleteMapper func() sq.DeleteQuery
type InsertMapper ¶
type InsertMapper func() sq.InsertQuery
type MACHINE ¶
type MACHINE struct { sq.TableStruct `sq:"machines"` ID sq.StringField `ddl:"notnull primarykey"` NAME sq.StringField `ddl:"notnull index"` KIND sq.StringField `ddl:"notnull"` }
type QueryMapper ¶
type QueryMapper[T any] func() (sq.SelectQuery, func(row *sq.Row) T)
type USER ¶
type USER struct { sq.TableStruct `sq:"users"` USERNAME sq.StringField `ddl:"notnull primarykey"` NAME sq.StringField IS_DISABLED sq.BooleanField `ddl:"notnull"` }
type USER_DEVICE_METADATA ¶
type USER_DEVICE_METADATA struct { sq.TableStruct `sq:"user_devices_metadata"` ID sq.StringField `ddl:"notnull primarykey"` PUBLIC_KEY sq.StringField `ddl:"notnull index"` USER_ID sq.StringField `ddl:"notnull index"` NAME sq.StringField `ddl:"notnull"` }
type UpdateMapper ¶
type UpdateMapper func() sq.UpdateQuery
Click to show internal directories.
Click to hide internal directories.