MCPcopy Index your code
hub / github.com/ByteStorage/FlyDB / NewListStructure

Function NewListStructure

structure/list.go:39–45  ·  view source on GitHub ↗

NewListStructure returns a new ListStructure It will return a nil ListStructure if the database cannot be opened or the database cannot be created The database will be created if it does not exist

(options config.Options)

Source from the content-addressed store, hash-verified

37// or the database cannot be created
38// The database will be created if it does not exist
39func NewListStructure(options config.Options) (*ListStructure, error) {
40 db, err := engine.NewDB(options)
41 if err != nil {
42 return nil, err
43 }
44 return &ListStructure{db: db}, nil
45}
46
47// LPush adds a value to the left of the list corresponding to the key
48// If the key does not exist, it will create the key

Callers 2

NewListServiceFunction · 0.92
initListFunction · 0.85

Calls 1

NewDBFunction · 0.92

Tested by 1

initListFunction · 0.68