|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.almworks.sqlite4java.SQLiteLongArray
public class SQLiteLongArray
SQLiteLongArray wraps a virtual table handle, created with SQLiteConnection.createArray(java.lang.String, boolean)
(sqlite3_intarray*
in test_intarray.h).
Use methods of this class to set the array's contents (maybe several times), and dispose it when done.
value
.
Values must not be unique or come in any order - they are not a primary key, nor is there an index over them.
That also means searching through the virtual array table is done with a full scan, so be careful with the
performance.
Method Summary | |
---|---|
SQLiteLongArray |
bind(long[] values)
Fills virtual array table with values from a Java array. |
SQLiteLongArray |
bind(long[] values,
int offset,
int length)
Fills virtual array table with values from the specified portion of a Java array. |
void |
dispose()
Disposes this instance, making it unusable and freeing the resources. |
java.lang.String |
getName()
Returns the name of the virtual table, which should be used in SQL. |
boolean |
isDisposed()
Returns true if the instance is disposed and cannot be used. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String getName()
public boolean isDisposed()
public java.lang.String toString()
toString
in class java.lang.Object
public void dispose()
dispose()
second time has no effect.
Calling bind(long[], int, int)
after instance has been disposed would result in exception.
public SQLiteLongArray bind(long[] values, int offset, int length) throws SQLiteException
values
- array of the values to bind, may be null if length == 0offset
- the index of an element to be bound as the first rowlength
- the number of values to bind, if set to 0 then the virtual array table will be empty
SQLiteException
- if this instance has been disposed or problem occurs on the underlying layer
java.lang.ArrayIndexOutOfBoundsException
- if offset and length do not specify a valid range within values array
java.lang.NullPointerException
- if values is null and length is not zeropublic SQLiteLongArray bind(long[] values) throws SQLiteException
bind(long[], int, int)
.
values
- array of the values to bind, if null - bind to an empty array
SQLiteException
- if this instance has been disposed or problem occurs on the underlying layer
java.lang.ArrayIndexOutOfBoundsException
- if offset and length do not specify a valid range within values array
java.lang.NullPointerException
- if values is null and length is not zero
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |