Cursor.CursorDirection| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoIncrement |
protected DatabaseCursorCallback<K,V> |
callback |
protected K |
cursorKey |
protected Cursor.CursorDirection |
direction |
protected Array<String> |
indexColumnNames |
protected Array<String> |
keyPath |
protected WSQLKeyRange<K> |
keyRange |
protected int |
length |
protected String |
objectStoreName |
protected int |
offset |
protected SQLResultSet |
resultSet |
protected WSQLTransaction |
transaction |
| Modifier | Constructor and Description |
|---|---|
protected |
WSQLCursor(WSQLAbstractDatabase db,
WSQLKeyRange<K> range,
String objectStoreName,
boolean autoIncrement,
Cursor.CursorDirection direction,
WSQLTransaction transaction) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addKeyRangeToQuery(KeyRange<K> range,
StringBuilder sql,
com.google.gwt.core.client.JsArrayMixed args) |
protected abstract void |
addKeyToQuery(K key,
StringBuilder sql,
com.google.gwt.core.client.JsArrayMixed args) |
protected abstract void |
addPrimaryKeyToQuery(P key,
StringBuilder sql,
com.google.gwt.core.client.JsArrayMixed args) |
void |
advance(int count)
Advance the cursor current position by a number of positions.
|
protected void |
appendGroupColumns(StringBuilder sql) |
void |
continueCursor()
Make cursor to go to the next element.
|
void |
continueCursor(K key)
Make cursor to go to the element referenced by the given key.
|
protected abstract V |
decodeObject(String encodedObject) |
void |
delete()
Delete the current value, pointed by the cursor, from the database.
|
protected abstract void |
encodeObject(V object,
WSQLAbstractObjectStore.EncodeCallback callback) |
protected void |
fireSuccess() |
Cursor.CursorDirection |
getDirection()
Direction of iteration used by this cursor.
|
protected SQLTransaction.SQLStatementErrorCallback |
getErrorHandler(Callback callback) |
protected abstract Array<String> |
getIndexedColumnNames() |
protected void |
getIndexesValuesForObject(com.google.gwt.core.client.JavaScriptObject object,
Array<String> columnNames,
com.google.gwt.core.client.JsArrayMixed output) |
protected abstract Array<String> |
getKeyPath() |
com.google.gwt.core.client.JsArrayMixed |
getNativeArrayKey()
Return the cursor key, as a native javascript object.
|
protected abstract P |
getPrimaryKey() |
V |
getValue()
Return the value of record pointed by the cursor.
|
boolean |
hasValue()
Return true if cursor points to a valid value.
|
protected abstract void |
setObjectKey(V object,
P key) |
protected int |
size() |
void |
start(DatabaseCursorCallback<K,V> c) |
void |
update(V value)
Update current record pointed by the cursor with the given value.
|
reportErrorprotected final Cursor.CursorDirection direction
protected final WSQLTransaction transaction
protected WSQLKeyRange<K> keyRange
protected String objectStoreName
protected int offset
protected int length
protected SQLResultSet resultSet
protected DatabaseCursorCallback<K,V> callback
protected K cursorKey
protected final boolean autoIncrement
protected WSQLCursor(WSQLAbstractDatabase db, WSQLKeyRange<K> range, String objectStoreName, boolean autoIncrement, Cursor.CursorDirection direction, WSQLTransaction transaction)
public void start(DatabaseCursorCallback<K,V> c)
public void advance(int count)
Cursorpublic void continueCursor()
CursorcontinueCursor in interface Cursor<K,V>public void continueCursor(K key)
CursorcontinueCursor in interface Cursor<K,V>key - key of the element to be pointed by the cursor.public void delete()
Cursorpublic void update(V value)
Cursorpublic boolean hasValue()
Cursorprotected int size()
protected void getIndexesValuesForObject(com.google.gwt.core.client.JavaScriptObject object,
Array<String> columnNames,
com.google.gwt.core.client.JsArrayMixed output)
protected void appendGroupColumns(StringBuilder sql)
protected SQLTransaction.SQLStatementErrorCallback getErrorHandler(Callback callback)
public Cursor.CursorDirection getDirection()
CursorgetDirection in interface Cursor<K,V>public V getValue()
Cursorpublic com.google.gwt.core.client.JsArrayMixed getNativeArrayKey()
CursorgetNativeArrayKey in interface Cursor<K,V>protected void fireSuccess()
protected abstract P getPrimaryKey()
protected abstract void addKeyRangeToQuery(KeyRange<K> range, StringBuilder sql, com.google.gwt.core.client.JsArrayMixed args)
protected abstract void addKeyToQuery(K key, StringBuilder sql, com.google.gwt.core.client.JsArrayMixed args)
protected abstract void addPrimaryKeyToQuery(P key, StringBuilder sql, com.google.gwt.core.client.JsArrayMixed args)
protected abstract void encodeObject(V object, WSQLAbstractObjectStore.EncodeCallback callback)
Copyright © 2015. All rights reserved.