public interface Driver
| Modifier and Type | Method and Description |
|---|---|
<T extends java.lang.Comparable<T>> |
addIndex(java.lang.String indexName,
MapFunction<T> mapFunction) |
void |
beginTransaction() |
void |
close() |
void |
commitTransaction() |
void |
compact() |
void |
delete(java.util.UUID key)
delete the database object with key
key |
void |
deleteIndex(java.lang.String indexName) |
java.util.UUID |
genId() |
com.devsmart.ubjson.UBValue |
get(java.util.UUID key)
loads the database value with
key |
com.devsmart.ubjson.UBObject |
getMeta() |
long |
incrementLongField(java.lang.String fieldName) |
void |
insert(java.util.UUID id,
com.devsmart.ubjson.UBValue value)
inserts a new value into the the database.
|
<T extends java.lang.Comparable<T>> |
queryIndex(java.lang.String indexName,
T min,
boolean minInclusive,
T max,
boolean maxInclusive) |
void |
recomputeIndex(java.lang.String indexName) |
void |
rollbackTransaction() |
void |
saveMeta(com.devsmart.ubjson.UBObject obj) |
void |
update(java.util.UUID id,
com.devsmart.ubjson.UBValue value)
replace value with key
id with new value value. |
void close()
com.devsmart.ubjson.UBObject getMeta()
throws java.io.IOException
java.io.IOExceptionvoid saveMeta(com.devsmart.ubjson.UBObject obj)
throws java.io.IOException
java.io.IOExceptioncom.devsmart.ubjson.UBValue get(java.util.UUID key)
throws java.io.IOException
keykey - java.io.IOExceptionvoid insert(java.util.UUID id,
com.devsmart.ubjson.UBValue value)
throws java.io.IOException
id - the new object key. This value should have originated from a call to genId()value - java.io.IOExceptionjava.util.UUID genId()
void update(java.util.UUID id,
com.devsmart.ubjson.UBValue value)
throws java.io.IOException
id with new value value.
If a value with with id does not exist, insert the key-value
pair.id - value - java.io.IOExceptionvoid delete(java.util.UUID key)
throws java.io.IOException
keykey - java.io.IOExceptionlong incrementLongField(java.lang.String fieldName)
<T extends java.lang.Comparable<T>> Cursor queryIndex(java.lang.String indexName, T min, boolean minInclusive, T max, boolean maxInclusive) throws java.io.IOException
java.io.IOException<T extends java.lang.Comparable<T>> void addIndex(java.lang.String indexName,
MapFunction<T> mapFunction)
throws java.io.IOException
java.io.IOExceptionvoid recomputeIndex(java.lang.String indexName)
void deleteIndex(java.lang.String indexName)
void beginTransaction()
throws java.io.IOException
java.io.IOExceptionvoid commitTransaction()
throws java.io.IOException
java.io.IOExceptionvoid rollbackTransaction()
throws java.io.IOException
java.io.IOExceptionvoid compact()
throws java.io.IOException
java.io.IOException