|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.test.synth.sql.DbState
public class DbState
Represents a connection to a simulated database.
Method Summary | |
---|---|
void |
commit()
Commit a pending transaction. |
void |
connect()
Connect to the database. |
void |
createIndex(Index index)
Create an index. |
void |
createTable(org.h2.test.synth.sql.Table table)
Create the specified table. |
org.h2.test.synth.sql.Result |
delete(org.h2.test.synth.sql.Table table,
java.lang.String condition)
Delete a number of rows. |
void |
disconnect()
Disconnect from the database. |
void |
dropIndex(Index index)
Drop an index. |
void |
dropTable(org.h2.test.synth.sql.Table table)
Drop the specified table. |
void |
end()
Close the connection and the database. |
org.h2.test.synth.sql.Result |
insert(org.h2.test.synth.sql.Table table,
org.h2.test.synth.sql.Column[] c,
Value[] v)
Insert a row into a table. |
void |
reset()
Drop all objects in the database. |
void |
rollback()
Roll back a pending transaction. |
org.h2.test.synth.sql.Result |
select(java.lang.String sql)
Execute a query. |
void |
setAutoCommit(boolean b)
Enable or disable autocommit. |
java.lang.String |
toString()
|
org.h2.test.synth.sql.Result |
update(org.h2.test.synth.sql.Table table,
org.h2.test.synth.sql.Column[] columns,
Value[] values,
java.lang.String condition)
Update the given table with the new values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void reset()
DbInterface
reset
in interface DbInterface
public void connect()
DbInterface
connect
in interface DbInterface
public void disconnect()
DbInterface
disconnect
in interface DbInterface
public void createTable(org.h2.test.synth.sql.Table table)
DbInterface
createTable
in interface DbInterface
table
- the table to createpublic void dropTable(org.h2.test.synth.sql.Table table)
DbInterface
dropTable
in interface DbInterface
table
- the table to droppublic void createIndex(Index index)
DbInterface
createIndex
in interface DbInterface
index
- the index to createpublic void dropIndex(Index index)
DbInterface
dropIndex
in interface DbInterface
index
- the index to droppublic org.h2.test.synth.sql.Result insert(org.h2.test.synth.sql.Table table, org.h2.test.synth.sql.Column[] c, Value[] v)
DbInterface
insert
in interface DbInterface
table
- the tablec
- the column listv
- the values
public org.h2.test.synth.sql.Result select(java.lang.String sql)
DbInterface
select
in interface DbInterface
sql
- the SQL statement
public org.h2.test.synth.sql.Result delete(org.h2.test.synth.sql.Table table, java.lang.String condition)
DbInterface
delete
in interface DbInterface
table
- the tablecondition
- the condition
public org.h2.test.synth.sql.Result update(org.h2.test.synth.sql.Table table, org.h2.test.synth.sql.Column[] columns, Value[] values, java.lang.String condition)
DbInterface
update
in interface DbInterface
table
- the tablecolumns
- the columns to updatevalues
- the new valuescondition
- the condition
public void setAutoCommit(boolean b)
DbInterface
setAutoCommit
in interface DbInterface
b
- the new valuepublic void commit()
DbInterface
commit
in interface DbInterface
public void rollback()
DbInterface
rollback
in interface DbInterface
public void end()
DbInterface
end
in interface DbInterface
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |