Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
db_conn_str_mysql |
private static java.lang.String |
db_conn_str_pgsql |
private static java.lang.String |
db_driver_str_mysql |
private static java.lang.String |
db_driver_str_pgsql |
private static java.lang.String |
db_pwd_str |
private static java.lang.String |
db_usr_str |
private Row |
rowdef |
private java.sql.Connection |
theDBConnection |
Constructor and Description |
---|
SQLTable(java.lang.String dbType,
Row rowdef) |
Modifier and Type | Method and Description |
---|---|
void |
addUnique(Row.Entry row) |
void |
clear() |
void |
close() |
boolean |
delete(byte[] key) |
void |
deleteOnExit() |
java.lang.String |
filename() |
Row.Entry |
get(byte[] key,
boolean forcecopy) |
java.util.Map<byte[],Row.Entry> |
get(java.util.Collection<byte[]> keys,
boolean forcecopy) |
boolean |
has(byte[] key) |
boolean |
isEmpty() |
java.util.Iterator<Row.Entry> |
iterator() |
CloneableIterator<byte[]> |
keys(boolean up,
byte[] startKey) |
byte[] |
largestKey() |
long |
mem() |
private void |
openDatabaseConnection(java.lang.String dbType) |
void |
optimize() |
boolean |
put(Row.Entry row)
Adds the row to the index.
|
java.util.List<Row.Entry> |
random(int count) |
Row.Entry |
remove(byte[] key) |
java.util.ArrayList<RowCollection> |
removeDoubles() |
Row.Entry |
removeOne() |
Row.Entry |
replace(Row.Entry row) |
Row |
row() |
CloneableIterator<Row.Entry> |
rows() |
CloneableIterator<Row.Entry> |
rows(boolean up,
byte[] startKey) |
int |
size() |
byte[] |
smallestKey() |
java.util.List<Row.Entry> |
top(int count) |
private static final java.lang.String db_driver_str_mysql
private static final java.lang.String db_driver_str_pgsql
private static final java.lang.String db_conn_str_mysql
private static final java.lang.String db_conn_str_pgsql
private static final java.lang.String db_usr_str
private static final java.lang.String db_pwd_str
private java.sql.Connection theDBConnection
private final Row rowdef
public SQLTable(java.lang.String dbType, Row rowdef) throws java.lang.Exception
java.lang.Exception
private void openDatabaseConnection(java.lang.String dbType) throws java.lang.Exception
java.lang.Exception
public byte[] smallestKey()
smallestKey
in interface Index
public byte[] largestKey()
largestKey
in interface Index
public java.util.ArrayList<RowCollection> removeDoubles()
removeDoubles
in interface Index
public Row.Entry get(byte[] key, boolean forcecopy) throws java.io.IOException
public java.util.Map<byte[],Row.Entry> get(java.util.Collection<byte[]> keys, boolean forcecopy) throws java.io.IOException, java.lang.InterruptedException
public boolean put(Row.Entry row) throws java.io.IOException
Index
public void addUnique(Row.Entry row) throws java.io.IOException
public Row.Entry remove(byte[] key) throws java.io.IOException
public boolean delete(byte[] key) throws java.io.IOException
public java.util.List<Row.Entry> top(int count) throws java.io.IOException
public java.util.List<Row.Entry> random(int count) throws java.io.IOException
public CloneableIterator<Row.Entry> rows(boolean up, byte[] startKey) throws java.io.IOException
public java.util.Iterator<Row.Entry> iterator()
public CloneableIterator<Row.Entry> rows() throws java.io.IOException
public CloneableIterator<byte[]> keys(boolean up, byte[] startKey)
public void deleteOnExit()
deleteOnExit
in interface Index