Package | Description |
---|---|
net.aditsu.depeche | |
net.aditsu.jdbsimple |
Modifier and Type | Method and Description |
---|---|
void |
Provider.addColumn(String table,
Column col,
Conn conn)
Adds a column to a table using a given connection
|
void |
Provider.addFKey(FKey fk,
Conn conn)
Adds a foreign key constraint, using a given connection
|
void |
Provider.addUnique(UniqueConstraint c,
Conn conn)
Adds a unique constraint, using a given connection
|
void |
Provider.batchInsert(Conn conn,
String table,
List<Record> records)
Inserts a list of records into a table, in a single batch, using a given connection
|
int |
Query.count(Conn conn)
Returns the number of rows that this SELECT query would find, as an int value.
|
void |
Provider.createTable(TableInfo tinfo,
Conn conn)
Creates a table given its information, using a given connection, with no constraints other than primary key
|
void |
Provider.createView(String name,
String def,
Conn conn)
Creates a view given its name and definition, using a given connection
|
int |
Query.delete(Conn conn)
Runs this query as a DELETE query using the given connection and returns the number of rows
|
void |
Record.delete(Conn conn)
Deletes this record from the database using the given connection
|
void |
Provider.dropColumn(String table,
Column col,
Conn conn)
Drops a column from a table using a given connection
|
void |
Provider.dropFKey(FKey fk,
Conn conn)
Drops a foreign key constraint, using a given connection
|
void |
Provider.dropTable(String name,
Conn conn)
Drops a table given its name, using a given connection
|
void |
Provider.dropView(String name,
Conn conn)
Drops a view given its name, using a given connection
|
int |
Provider.execute(String sql,
Conn conn)
Runs the given query directly as an UPDATE, using the given connection and returns the number of rows affected
|
boolean |
Record.exists(Conn conn)
Returns true if this record exists in the database (checking by primary key, using the given connection)
|
int |
SQLiteProvider.getLastId(Conn conn) |
int |
Provider.getLastId(Conn conn)
Returns the last generated auto-increment value in a given connection as an int value
|
long |
SQLServerProvider.getLongLastId(Conn conn) |
long |
SQLiteProvider.getLongLastId(Conn conn) |
long |
Provider.getLongLastId(Conn conn)
Returns the last generated auto-increment value in a given connection as a long value
|
long |
PGProvider.getLongLastId(Conn conn) |
long |
MySQLProvider.getLongLastId(Conn conn) |
long |
H2Provider.getLongLastId(Conn conn) |
Record |
SQLQuery.getOneRecord(Conn conn)
Runs this query as a SELECT (if needed) using the given connection and returns a single record;
it throws an exception if the number of results is not 1
|
Record |
SQLQuery.getRecord(Conn conn)
Runs this query as a SELECT (if needed) using the given connection and returns a single record, or null if there are no results;
it throws an exception if there are multiple results
|
Record |
Provider.getRecord(String table,
Conn conn,
List<Serializable> values)
Returns a single record (or null if not found) given its table and primary key values,
using a given connection
|
Record |
Provider.getRecord(String table,
Conn conn,
Serializable... values)
Returns a single record (or null if not found) given its table and primary key values,
using a given connection
|
TableInfo |
Provider.getTableInfo(String table,
Conn conn)
Returns the table information for a given table,
using the given connection if needed
|
TableInfo |
Provider.getTableInfo(Table t,
Conn conn)
Returns the table information for a given table,
using the given connection if needed
|
int |
Query.insert(Conn conn)
Runs this query as an INSERT query using the given connection and returns the number of rows
|
int |
Record.insert(Conn conn)
Inserts this record into the database using the given connection,
and updates the autoincrement field (if any) with the generated value
|
long |
Query.longCount(Conn conn)
Returns the number of rows that this SELECT query would find, as a long value.
|
Record |
Provider.newRecord(String table,
Conn conn)
Creates a new record for a given table, using the given connection if needed
|
void |
Record.refresh(Conn conn)
Refreshes this record (based on its primary key) with the values from the database,
using the given connection
|
void |
Record.refresh(Conn conn,
RowLock rowLock)
Refreshes this record (based on its primary key) with the values from the database,
using the given connection, and locks it with the given row lock
|
Table |
Provider.resolveTable(String table,
Conn conn)
Resolves a table given as a string to its proper definition,
using the given connection if needed
|
Table |
SQLiteProvider.resolveTableImpl(String table,
Conn conn) |
T |
DBTask.run(Conn conn) |
int |
Record.save(Conn conn)
Saves this record to the database using the given connection.
|
Query |
Query.select(Conn conn) |
SQLQuery |
SQLQuery.select(Conn conn)
Runs this query as a SELECT using the given connection (and caches the results)
|
void |
Provider.setColumnComment(String table,
String column,
String value,
Conn conn)
Sets a comment on a table column, using a given connection
|
void |
RawQuery.startBatch(Conn conn,
boolean keepParams)
Starts a batch update using this query and the given connection
|
void |
Query.startDeleteBatch(Conn conn,
boolean keepParams)
Starts a batch DELETE using this query and the given connection
|
void |
Query.startInsertBatch(Conn conn,
boolean keepParams)
Starts a batch INSERT using this query and the given connection
|
void |
Query.startUpdateBatch(Conn conn,
boolean keepParams)
Starts a batch UPDATE using this query and the given connection
|
int |
SQLQuery.update(Conn conn)
Runs this query as an UPDATE using the given connection and returns the number of rows affected
|
void |
Record.update(Conn conn)
Updates this record in the database using the given connection
|
Modifier and Type | Method and Description |
---|---|
Conn |
AbstractConnSource.getConn() |
Conn |
ConnSource.getConn()
Returns a new connection
|