Documentation ¶
Index ¶
- type Bolt
- func (b *Bolt) Aggregate(ctx context.Context, col string, req *model.AggregateRequest) (interface{}, error)
- func (b *Bolt) Batch(ctx context.Context, req *model.BatchRequest) ([]int64, error)
- func (b *Bolt) Close() error
- func (b *Bolt) Create(ctx context.Context, col string, req *model.CreateRequest) (int64, error)
- func (b *Bolt) CreateDatabaseIfNotExist(ctx context.Context, project string) error
- func (b *Bolt) Delete(ctx context.Context, col string, req *model.DeleteRequest) (int64, error)
- func (b *Bolt) DeleteCollection(ctx context.Context, col string) error
- func (b *Bolt) DescribeTable(ctx context.Context, col string) ([]model.InspectorFieldType, []model.IndexType, error)
- func (b *Bolt) GetCollections(ctx context.Context) ([]utils.DatabaseCollections, error)
- func (b *Bolt) GetConnectionState(ctx context.Context) bool
- func (b *Bolt) GetDBType() model.DBType
- func (b *Bolt) IsClientSafe(ctx context.Context) error
- func (b *Bolt) IsSame(conn, dbName string, driverConf config.DriverConfig) bool
- func (b *Bolt) RawBatch(ctx context.Context, batchedQueries []string) error
- func (b *Bolt) RawQuery(ctx context.Context, query string, isDebug bool, args []interface{}) (int64, interface{}, *model.SQLMetaData, error)
- func (b *Bolt) Read(ctx context.Context, col string, req *model.ReadRequest) (int64, interface{}, map[string]map[string]string, *model.SQLMetaData, error)
- func (b *Bolt) SetProjectAESKey(aesKey []byte)
- func (b *Bolt) SetQueryFetchLimit(limit int64)
- func (b *Bolt) Update(ctx context.Context, col string, req *model.UpdateRequest) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bolt ¶
type Bolt struct {
// contains filtered or unexported fields
}
Bolt holds the bolt session
func (*Bolt) Aggregate ¶
func (b *Bolt) Aggregate(ctx context.Context, col string, req *model.AggregateRequest) (interface{}, error)
Aggregate performs a bolt db pipeline aggregation
func (*Bolt) CreateDatabaseIfNotExist ¶
CreateDatabaseIfNotExist creates a project if none exist
func (*Bolt) DeleteCollection ¶
DeleteCollection deletes collection / tables name of specified database
func (*Bolt) DescribeTable ¶
func (b *Bolt) DescribeTable(ctx context.Context, col string) ([]model.InspectorFieldType, []model.IndexType, error)
DescribeTable return a structure of sql table
func (*Bolt) GetCollections ¶
GetCollections returns collection / tables name of specified database
func (*Bolt) GetConnectionState ¶
GetConnectionState : function to check connection state
func (*Bolt) IsClientSafe ¶
IsClientSafe checks whether database is enabled and connected
func (*Bolt) IsSame ¶
func (b *Bolt) IsSame(conn, dbName string, driverConf config.DriverConfig) bool
IsSame checks if we've got the same connection string
func (*Bolt) RawBatch ¶
RawBatch performs a batch operation for schema creation NOTE: not to be exposed externally
func (*Bolt) RawQuery ¶
func (b *Bolt) RawQuery(ctx context.Context, query string, isDebug bool, args []interface{}) (int64, interface{}, *model.SQLMetaData, error)
RawQuery query document(s) from the database
func (*Bolt) SetProjectAESKey ¶
SetProjectAESKey sets aes key
func (*Bolt) SetQueryFetchLimit ¶
SetQueryFetchLimit sets data fetch limit