Documentation ¶
Index ¶
- func BlockSyncerDBBuilder(ctx *database.Context) (database.Database, error)
- type DB
- func (db *DB) AutoMigrate(ctx context.Context, tables []schema.Tabler) error
- func (db *DB) CreateObjectIDMap(ctx context.Context, objectIDMap *bsdb.ObjectIDMap) error
- func (db *DB) CreatePrefixTree(ctx context.Context, prefixTree []*bsdb.SlashPrefixTreeNode) error
- func (db *DB) DeletePrefixTree(ctx context.Context, prefixTree []*bsdb.SlashPrefixTreeNode) error
- func (b *DB) GetBucketNameByObjectID(objectID common.Hash) (string, error)
- func (db *DB) GetMasterDB(ctx context.Context) (*bsdb.MasterDB, error)
- func (db *DB) GetObject(ctx context.Context, objectId common.Hash) (*models.Object, error)
- func (db *DB) GetPrefixTree(ctx context.Context, fullName, bucketName string) (*bsdb.SlashPrefixTreeNode, error)
- func (db *DB) GetPrefixTreeCount(ctx context.Context, pathName, bucketName string) (int64, error)
- func (db *DB) GetPrefixTreeObject(ctx context.Context, objectID common.Hash, bucketName string) (*bsdb.SlashPrefixTreeNode, error)
- func (db *DB) PrepareTables(ctx context.Context, tables []schema.Tabler) error
- func (db *DB) SaveObject(ctx context.Context, object *models.Object) error
- func (db *DB) SetMasterDB(ctx context.Context, masterDB *bsdb.MasterDB) error
- func (db *DB) UpdateObject(ctx context.Context, object *models.Object) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
DB represents a SQL database with expanded features. so that it can properly store custom BigDipper-related data.
func (*DB) AutoMigrate ¶ added in v0.2.3
func (*DB) CreateObjectIDMap ¶ added in v0.2.3
CreateObjectIDMap create object id map table entry
func (*DB) CreatePrefixTree ¶
CreatePrefixTree create prefix tree nodes by input slice
func (*DB) DeletePrefixTree ¶
DeletePrefixTree delete prefix tree nodes by given conditions
func (*DB) GetBucketNameByObjectID ¶ added in v0.2.3
GetBucketNameByObjectID get bucket name info by an object id
func (*DB) GetMasterDB ¶
GetMasterDB get master db info
func (*DB) GetPrefixTree ¶
func (db *DB) GetPrefixTree(ctx context.Context, fullName, bucketName string) (*bsdb.SlashPrefixTreeNode, error)
GetPrefixTree get prefix tree node by full name and bucket name
func (*DB) GetPrefixTreeCount ¶
GetPrefixTreeCount get prefix tree nodes count by path and bucket name
func (*DB) GetPrefixTreeObject ¶
func (db *DB) GetPrefixTreeObject(ctx context.Context, objectID common.Hash, bucketName string) (*bsdb.SlashPrefixTreeNode, error)
GetPrefixTreeObject get prefix tree node object by object id
func (*DB) PrepareTables ¶ added in v0.2.3
func (*DB) SaveObject ¶ added in v0.2.3
func (*DB) SetMasterDB ¶
SetMasterDB set the master db
Click to show internal directories.
Click to hide internal directories.