MCPcopy Index your code

hub / github.com/hashicorp/go-memdb / functions

Functions188 in github.com/hashicorp/go-memdb

↓ 105 callersMethodInsert
Insert is used to add or update an object into the given table. When updating an object, the obj provided should be a copy rather than a value update
txn.go:183
↓ 80 callersMethodTxn
Txn is used to start a new transaction in either read or write mode. There can only be a single concurrent writer, but any number of readers.
memdb.go:74
↓ 70 callersMethodNext
Next returns the next result from the iterator. If there are no more results nil is returned.
txn.go:729
↓ 61 callersMethodFirst
First is used to return the first matching object for the given constraints on the index. Note that all values read in the transaction form a consist
txn.go:605
↓ 36 callersMethodCommit
Commit is used to finalize this transaction. This is a noop for read transactions, already aborted or committed transactions.
txn.go:133
↓ 30 callersMethodGet
Get is used to construct a ResultIterator over all the rows that match the given constraints of an index. The index values must match exactly (this is
txn.go:744
↓ 27 callersFunctionnoErr
(t *testing.T, err error)
integ_test.go:412
↓ 27 callersFunctiontestObj
()
index_test.go:50
↓ 25 callersFunctiontestDB
(t *testing.T)
txn_test.go:13
↓ 16 callersMethodFromObject
FromObject extracts index values from an object. The return values are the same as a SingleIndexer except there can be multiple index values.
index.go:48
↓ 15 callersMethodAbort
Abort is used to cancel this transaction. This is a noop for read transactions, already aborted or commited transactions.
txn.go:110
↓ 15 callersMethodDelete
Delete is used to delete a single object from the given table. This object must already exist in the table.
txn.go:307
↓ 11 callersMethodWatch
Watch blocks until one of the channels in the watch set is closed, or timeoutCh sends a value. Returns true if timeoutCh is what caused Watch to unblo
watch.go:52
↓ 10 callersMethodAdd
Add appends a watchCh to the WatchSet if non-nil.
watch.go:21
↓ 10 callersMethodLongestPrefix
LongestPrefix is used to fetch the longest prefix match for the given constraints on the index. Note that this will not work with the memdb StringFiel
txn.go:630
↓ 10 callersFunctionNewMemDB
NewMemDB creates a new MemDB with the given schema.
memdb.go:39
↓ 10 callersFunctionNewWatchSet
NewWatchSet constructs a new watch set.
watch.go:16
↓ 10 callersFunctioncompareEncoded
(t *testing.T, indexer Indexer, l interface{}, r interface{}, expected int)
index_test.go:978
↓ 10 callersMethodparseString
parseString parses a UUID from the string. If enforceLength is false, it will parse a partial UUID. An error is returned if the input, stripped of hyp
index.go:573
↓ 9 callersMethodNext
Next returns the next non-filtered result from the wrapped iterator.
filter.go:35
↓ 8 callersMethodFromArgs
FromArgs is called to build the exact index key from a list of arguments.
index.go:24
↓ 8 callersMethodFromArgs
(args ...interface{})
index.go:319
↓ 8 callersMethodFromArgs
(args ...interface{})
index.go:415
↓ 8 callersFunctiongenerateUUID
()
index_test.go:597
↓ 7 callersMethodAddWithLimit
AddWithLimit appends a watchCh to the WatchSet if non-nil, and if the given softLimit hasn't been exceeded. Otherwise, it will watch the given alterna
watch.go:40
↓ 7 callersMethodDeleteAll
DeleteAll is used to delete all the objects in a given table matching the constraints on the index
txn.go:486
↓ 7 callersFunctionassertNilError
(t *testing.T, err error)
txn_test.go:2228
↓ 7 callersMethodwritableIndex
writableIndex returns a transaction usable for modifying the given index in a table.
txn.go:80
↓ 6 callersMethodFromArgs
(args ...interface{})
index.go:97
↓ 6 callersMethodFromArgs
(args ...interface{})
index.go:171
↓ 6 callersMethodFromObject
(obj interface{})
index.go:66
↓ 6 callersMethodSnapshot
Snapshot is used to capture a point-in-time snapshot of the database that will not be affected by any write operations to the existing DB. If MemDB
memdb.go:92
↓ 5 callersMethodFromArgs
(args ...interface{})
index.go:537
↓ 5 callersMethodFromObject
(obj interface{})
index.go:609
↓ 5 callersMethodGetReverse
GetReverse is used to construct a Reverse ResultIterator over all the rows that match the given constraints of an index. The returned ResultIterator's
txn.go:769
↓ 5 callersMethodPrefixFromArgs
(args ...interface{})
index.go:555
↓ 5 callersMethodValidate
Validate validates the schema.
schema.go:19
↓ 5 callersMethodgetIndexValue
getIndexValue is used to get the IndexSchema and the value used to scan the index given the parameters. This handles prefix based scans when the index
txn.go:660
↓ 5 callersFunctionindexPath
indexPath returns the path from the root to the given table index
memdb.go:117
↓ 5 callersMethodreadableIndex
readableIndex returns a transaction usable for reading the given index in a table. If the transaction is a write transaction with modifications, a clo
txn.go:61
↓ 5 callersFunctiontestValidSchema
()
schema_test.go:8
↓ 4 callersMethodDefer
Defer is used to push a new arbitrary function onto a stack which gets called when a transaction is committed and finished. Deferred functions are cal
txn.go:962
↓ 4 callersMethodFromArgs
WARNING: Because of a bug in FromObject, this function will never return a value when using the single-argument version.
index.go:260
↓ 4 callersMethodFromArgs
(args ...interface{})
index.go:506
↓ 4 callersMethodFromArgs
(args ...interface{})
index.go:626
↓ 4 callersMethodFromArgs
(args ...interface{})
index.go:655
↓ 4 callersMethodFromObject
(obj interface{})
index.go:135
↓ 4 callersMethodFromObject
(obj interface{})
index.go:481
↓ 4 callersMethodLast
Last is used to return the last matching object for the given constraints on the index. Note that all values read in the transaction form a consisten
txn.go:615
↓ 4 callersMethodPrefixFromArgs
(args ...interface{})
index.go:728
↓ 4 callersMethodValidate
()
schema.go:103
↓ 4 callersMethodWatchCtx
WatchCtx blocks until one of the channels in the watch set is closed, or ctx is done (cancelled or exceeds the deadline). WatchCtx returns an error if
watch.go:77
↓ 3 callersMethodChanges
Changes returns the set of object changes that have been made in the transaction so far. If change tracking is not enabled it wil always return nil. I
txn.go:869
↓ 3 callersMethodFirstWatch
FirstWatch is used to return the first matching object for the given constraints on the index along with the watch channel. Note that all values read
txn.go:534
↓ 3 callersMethodFromArgs
(args ...interface{})
index.go:713
↓ 3 callersMethodFromObject
(obj interface{})
index.go:518
↓ 3 callersMethodFromObject
(obj interface{})
index.go:641
↓ 3 callersMethodFromObject
(raw interface{})
index.go:690
↓ 3 callersFunctionNewFilterIterator
NewFilterIterator wraps a ResultIterator. The filter function is applied to each value returned by a call to iter.Next. See the documentation for Res
filter.go:24
↓ 3 callersMethodPrefixFromArgs
(args ...interface{})
index.go:113
↓ 3 callersMethodPrefixFromArgs
(args ...interface{})
index.go:187
↓ 3 callersMethodSnapshot
Snapshot creates a snapshot of the current state of the transaction. Returns a new read-only transaction or nil if the transaction is already aborted
txn.go:1006
↓ 3 callersMethodValidate
Validate is used to validate the table schema
schema.go:53
↓ 3 callersFunctionfromBoolArgs
fromBoolArgs is a helper that expects only a single boolean argument and returns a single length byte array containing either a one or zero depending
index.go:662
↓ 3 callersMethodgetRoot
getRoot is used to do an atomic load of the root pointer
memdb.go:67
↓ 3 callersFunctiontestPerson
()
integ_test.go:546
↓ 3 callersFunctiontestPlace
()
integ_test.go:558
↓ 2 callersMethodDeletePrefix
DeletePrefix is used to delete an entire subtree based on a prefix. The given index must be a prefix index, and will be used to perform a scan and enu
txn.go:384
↓ 2 callersMethodFromObject
(obj interface{})
index.go:220
↓ 2 callersMethodFromObject
(raw interface{})
index.go:795
↓ 2 callersFunctionIsIntType
IsIntType returns whether the passed type is a type of int and the number of bytes needed to encode the type.
index.go:368
↓ 2 callersFunctionIsUintType
IsUintType returns whether the passed type is a type of uint and the number of bytes needed to encode the type.
index.go:458
↓ 2 callersMethodPrefixFromArgs
PrefixFromArgs is the same as FromArgs for an Indexer except that the index value returned should return all prefix-matched values.
index.go:56
↓ 2 callersMethodWatchCh
()
txn.go:726
↓ 2 callersFunctionencodeInt
(val int64, size int)
index.go:341
↓ 2 callersFunctionencodeUInt
(val uint64, size int)
index.go:437
↓ 2 callersMethodgetIndexIterator
(table, index string, args ...interface{})
txn.go:926
↓ 2 callersMethodgetIndexIteratorReverse
(table, index string, args ...interface{})
txn.go:942
↓ 2 callersFunctiontestComplexDB
(t *testing.T)
integ_test.go:538
↓ 2 callersFunctiontestPopulateData
(t *testing.T, db *MemDB)
integ_test.go:357
↓ 2 callersFunctiontestWatch
testWatch makes a bunch of watch channels based on the given size and fires the one at the given fire index to make sure it's detected (or a timeout o
watch_test.go:20
↓ 2 callersFunctiontestWatchCh
(size, fire int)
watch_test.go:115
↓ 2 callersFunctionverifyNoResults
(t *testing.T, txn *Txn, table string, index string, value string)
txn_test.go:1013
↓ 2 callersFunctionwatchFew
watchFew is used if there are only a few watchers as a performance optimization.
watch_few.go:18
↓ 1 callersMethodFromObject
(obj interface{})
index.go:295
↓ 1 callersMethodFromObject
(obj interface{})
index.go:391
↓ 1 callersMethodLastWatch
LastWatch is used to return the last matching object for the given constraints on the index along with the watch channel. Note that all values read i
txn.go:574
↓ 1 callersMethodLowerBound
LowerBound is used to construct a ResultIterator over all the the range of rows that have an index value greater than or equal to the provide args. Ca
txn.go:799
↓ 1 callersMethodReverseLowerBound
ReverseLowerBound is used to construct a Reverse ResultIterator over all the the range of rows that have an index value less than or equal to the prov
txn.go:825
↓ 1 callersFunctionString
(s string)
index_test.go:46
↓ 1 callersMethodTrackChanges
TrackChanges enables change tracking for the transaction. If called at any point before commit, subsequent mutations will be recorded and can be retri
txn.go:52
↓ 1 callersMethodWatchCh
WatchCh returns a channel that is used to wait for any channel of the watch set to trigger or for the context to be cancelled. WatchCh creates a new g
watch.go:145
↓ 1 callersFunctionassertAllUnique
(t *testing.T, vals [][]byte)
index_test.go:1431
↓ 1 callersFunctionindexerFromFieldNameList
(keys []string)
index_test.go:1445
↓ 1 callersMethodinitialize
initialize is used to setup the DB for use after creation. This should be called only once after allocating a MemDB.
memdb.go:103
↓ 1 callersFunctionrender
render prints the template to stdout.
watch-gen/main.go:50
↓ 1 callersFunctiontestComplexSchema
()
integ_test.go:440
↓ 1 callersMethodwatchMany
watchMany is used if there are many watchers.
watch.go:96
FunctionBenchmarkCompoundMultiIndex_FromObject
(b *testing.B)
index_test.go:1457
FunctionBenchmarkUUIDFieldIndex_parseString
(b *testing.B)
index_test.go:586
next →1–100 of 188, ranked by callers