Table
Represents a table.
| Methods |
| static Table |
newRandomTable(TestSynth config)
Create a new random table.
|
| static Table |
newRandomTable(TestSynth config)
Create a new random table.
Parameters:
config - the configuration
Returns:
the table
|
| void |
addIndex(Index index)
Add this index to the table.
|
| void |
addIndex(Index index)
Add this index to the table.
Parameters:
index - the index to add
|
| int |
getColumnCount()
|
| int |
getColumnCount()
|
| Column[] |
getColumns()
|
| Column[] |
getColumns()
|
| String |
getCreateSQL()
Get the CREATE TABLE statement for this table.
|
| String |
getCreateSQL()
Get the CREATE TABLE statement for this table.
Returns:
the SQL statement
|
| String |
getDropSQL()
Get the DROP TABLE statement for this table.
|
| String |
getDropSQL()
Get the DROP TABLE statement for this table.
Returns:
the SQL statement
|
| String |
getInsertSQL(Column[] c, Value[] v)
Get the INSERT statement for this table.
|
| String |
getInsertSQL(Column[] c, Value[] v)
Get the INSERT statement for this table.
Parameters:
c - the column list
v - the value list
Returns:
the SQL statement
|
| String |
getName()
Get the table name.
|
| String |
getName()
Get the table name.
Returns:
the name
|
| Column |
getRandomColumn()
|
| Column |
getRandomColumn()
|
| Column |
getRandomColumnOfType(int type)
Get a random column of the specified type.
|
| Column |
getRandomColumnOfType(int type)
Get a random column of the specified type.
Parameters:
type - the type
Returns:
the column or null if no such column was found
|
| Column[] |
getRandomColumns(int len)
Get a number of random column from this table.
|
| Column[] |
getRandomColumns(int len)
Get a number of random column from this table.
Parameters:
len - the column count
Returns:
the columns
|
| Column |
getRandomConditionColumn()
Get a random column that can be used in a condition.
|
| Column |
getRandomConditionColumn()
Get a random column that can be used in a condition.
Returns:
the column
|
| Index |
newRandomIndex()
Create a new random index.
|
| Index |
newRandomIndex()
Create a new random index.
Returns:
the index
|
| void |
removeIndex(Index index)
Remove an index from the table.
|
| void |
removeIndex(Index index)
Remove an index from the table.
Parameters:
index - the index to remove
|
|