Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/craigmj/gophia
/ functions
Functions
77 in github.com/craigmj/gophia
⨍
Functions
77
◇
Types & classes
8
↓ 9 callers
Method
Error
Error returns any error on the database. It should not be necessary to call this method, since most methods return errors automatically.
Database.go:120
↓ 9 callers
Method
Error
Error returns any error on the Environment. It should not be necessary to call this method, since the Go methods all return with errors themselves.
Environment.go:95
↓ 6 callers
Method
Close
Close closes the cursor. If a cursor is not closed, future operations on the database can hang indefinitely.
Cursor.go:22
↓ 6 callers
Method
Get
Get retrieves the value for the key.
Database.go:125
↓ 5 callers
Method
GetSS
GetSS returns a string value for a string key.
convenience.go:57
↓ 5 callers
Method
SetSS
SetSS sets a string key to a string value
convenience.go:177
↓ 4 callers
Function
Open
Open opens the database with the given access permissions in the given directory.
convenience.go:140
↓ 4 callers
Method
Value
Value returns the current value of the cursor.
Cursor.go:49
↓ 3 callers
Method
Cursor
Cursor returns a Cursor for iterating over rows in the database. If no key is provided, the Cursor will iterate over all rows. The order flag decide
Database.go:96
↓ 3 callers
Method
DeleteS
DeleteS deletes the key from the database.
convenience.go:17
↓ 3 callers
Method
Fetch
Fetch fetches the next row for the cursor, and returns true if there is a next row, false if the cursor has reached the end of the rows.
Cursor.go:29
↓ 3 callers
Method
GetSO
GetSO fetches a gob encoded object for a string key.
convenience.go:52
↓ 3 callers
Method
Has
Has returns true if the database has a value for the key.
Database.go:147
↓ 3 callers
Method
Key
Key returns the current key of the cursor.
Cursor.go:34
↓ 3 callers
Method
Set
Set sets the value of the key.
Database.go:172
↓ 3 callers
Method
SetSO
SetSO sets a string key to an object value.
convenience.go:182
↓ 3 callers
Function
sp_close
sp_close closes the pointer and sets it to nil to ensure it cannot be closed twice.
Gophia.go:34
↓ 3 callers
Function
sp_error
sp_error returns the error for the given Sophia pointer as a golang error
Gophia.go:47
↓ 2 callers
Method
Begin
Begin starts a multi-statement transaction. During transaction, all updates are not written to the database files until a sp_commit(3) is called. All
Database.go:49
↓ 2 callers
Method
Close
Close closes the enviroment and frees its associated memory. You must call Close on any Environment created with NewEnvironment.
Environment.go:75
↓ 2 callers
Method
GetAO
GetAO returns on object value for a byte-array key.
convenience.go:36
↓ 2 callers
Method
MustHas
MustHas returns true if the key exists, false otherwise. It panics in the even of error.
convenience.go:83
↓ 2 callers
Method
MustHasS
MustHasS returns true if the string exists, or false if it does not. It panics in the event of error.
convenience.go:129
↓ 2 callers
Method
SetAO
SetAO sets a byte array key to an object value.
convenience.go:161
↓ 2 callers
Function
boolToCInt
boolToCInt converts a go boolean to a C int value that has boolean meaning
Environment.go:177
↓ 1 callers
Method
Commit
Commit applies changes to a multi-statement transaction. All modifications made during the transaction are written to the log file in a single batch.
Database.go:80
↓ 1 callers
Method
CursorS
CursorS returns a Cursor that fetches rows from the database from the given key, passed as a string. Callers must call Close() on the received Cursor.
convenience.go:12
↓ 1 callers
Method
Delete
Delete deletes the key from the database.
Database.go:110
↓ 1 callers
Method
Dir
Dir sets the access mode and the directory for the database.
Environment.go:64
↓ 1 callers
Method
GetSA
GetS retrieves an array value for a string key. It is a convenience method to simplify working with string keys.
convenience.go:47
↓ 1 callers
Method
KeyS
KeyS returns the current key as a string.
convenience.go:77
↓ 1 callers
Method
KeySize
KeySize returns the size of the current key.
Cursor.go:44
↓ 1 callers
Method
MustGetSA
MustGetSA returns the byte array value for the string key. It panics on error.
convenience.go:102
↓ 1 callers
Method
MustGetSS
MustGetSS returns the string value for a string key. It panics on an error.
convenience.go:119
↓ 1 callers
Function
NewEnvironment
NewEnvironment creates a new environment for opening a database. Receivers must call Close() on the returned Environment.
Environment.go:54
↓ 1 callers
Method
Open
Open() opens the database that has been configured in the Environment. At a minimum, it should be necessary to call Dir() on the Environment to specif
Environment.go:166
↓ 1 callers
Method
Rollback
Rollback discards the changes of a multi-statement transaction. All modifications made during the transaction are not written to the log file.
Database.go:163
↓ 1 callers
Method
SetSA
SetSA sets a string key to a byte array value.
convenience.go:172
↓ 1 callers
Method
ValueO
ValueO returns the current value as an object, by gob decoding the current value at the cursor.
convenience.go:194
↓ 1 callers
Method
ValueS
ValueS returns the current value as a string.
convenience.go:204
↓ 1 callers
Method
ValueSize
ValueSize returns the length of the current value.
Cursor.go:59
Method
Close
Close closes the database and frees its associated memory. You must call Close on any database opened with Open()
Database.go:64
Method
Cmp
Cmp sets the database comparator function to use for ordering keys. The function must return 0 if the keys are equal, -1 if the first key parameter i
Environment.go:85
Method
CursorString
* DEPRECATED METHODS *************************************************************/ CursorString returns a Cursor that fetches rows from the database
deprecated.go:9
Method
DeleteString
DeleteString deletes the key from the database. @deprecated Use DeleteS instead.
deprecated.go:15
Method
Each
Each iterates through the key-values in the database, passing each to the each function. It is a convenience wrapper around a Cursor iteration.
convenience.go:23
Method
GC
GC turns the garbage collector on or off.
Environment.go:109
Method
GCF
GCF sets database garbage collector factor value, which is used to determine when to start the GC. For example: factor 0.5 means that all 'live' page
Environment.go:123
Method
GetObject
GetObject fetches a gob encoded object into the out object. @deprecated Use GetAO instead.
deprecated.go:21
Method
GetObjectString
GetObjectString retrieves a gob encoded object into the out object. It is a convenience method to facilitate working with string keys. @deprecated Use
deprecated.go:28
Method
GetString
GetString returns a byte array value for a string key. @deprecated Use GetS instead.
deprecated.go:34
Method
GetStrings
GetString retrieves the string value for the string key. It is a convenience function for working with strings rather than byte slices. @deprecated Us
deprecated.go:41
Method
Grow
Grow sets the initial new size and resize factor for new database files. The values are used while the database extends during a merge. This option c
Environment.go:134
Method
HasS
HasS returns true if the database has a value for the string key.
convenience.go:66
Method
HasString
HasString returns true if the database has a value for the key. It is a convenience function for working with strings rather than byte slices. @deprec
deprecated.go:48
Method
KeyLen
KeyLen returns the length of the current key. It is a synonym for KeySize()
convenience.go:72
Method
KeyString
KeyString returns the current key as a string. @deprecated Use KeyS instead
deprecated.go:54
Method
Merge
Merge sets whether to launch a merger thread during Open().
Environment.go:142
Method
MergeWM
MergeWM sets the database merge watermark value. When the database update count reaches this value, it notifies the merger thread to create a new epo
Environment.go:156
Method
MustGet
MustGet returns the value of the key, or panics on an error.
convenience.go:92
Method
MustGetString
MustGetString returns the byte array value for the string key. It panics on error. @deprecated Use MustGetSA instead.
convenience.go:113
Method
MustGetStrings
MustGetStrings returns the string value for a string key. It panics on error. @deprecated Use MustGetSS instead.
deprecated.go:60
Method
MustHasString
MustHasString returns true if the string exists, or false if it does not. It panics in the event of error. @deprecated Use MustHasS instead
deprecated.go:67
Method
Next
Next is identical to Fetch. It exists because it seems that Next() is more go-idiomatic.
convenience.go:135
Method
Object
ValueObject returns the current object, by gob decoding the current value at the cursor. @deprecated Use ValueO instead.
deprecated.go:101
Method
Page
Page sets the max key count in a single page for the database. This option can be tweaked for performance.
Environment.go:101
Method
SetObject
SetObject will gob encode the object and store it with the key. @deprecated Use SetAO instead
deprecated.go:73
Method
SetObjectString
SetObjectString will gob encode the object and store it with the key. This is a convenience method to facilitate working with string keys. @deprecated
deprecated.go:80
Method
SetString
SetString sets the byte-slice value of the string key. It is a convenience function for working with string keys rather than byte slices. @deprecated
deprecated.go:87
Method
SetStrings
SetStrings sets the value of the key. It is a convenience function for working with strings rather than byte slices. @deprecated Use SetSS instead
deprecated.go:94
Function
TestBasicSanity
(t *testing.T)
Gophia_test.go:8
Function
TestGob
(t *testing.T)
Gophia_test.go:54
Function
TestIterator
(t *testing.T)
Gophia_test.go:89
Function
TestTransactions
(t *testing.T)
Gophia_test.go:130
Method
ValueLen
ValueLen returns the length of the current value. It is a synonym for ValueSize()
convenience.go:188
Method
ValueString
ValueString returns the current value as a string. @deprecated Use ValueS instead
deprecated.go:107
Function
go_sp_comparator
export go_sp_comparator
Gophia.go:25