DBTable

  
Type🟢 Interface
Packageio.github.mrtesz.teszcore.api.db.table
GitHubClassName.java
ExtendsCopyable<DBTable>

Description

Parent interface of all database table classes


Methods

getName

String getName();

Get the name of the table

Returns: String — the name of the table


getCreateCommand

String getCreateCommand();

Create the SQL query to create the table

Returns: String — the SQL query to create the table


getAlterColumnsCommands

Map<String, String> getAlterColumnsCommands();

Create the SQL queries to alter columns of the table

Returns: Map<String, String> — the SQL queries to alter the columns of the table mapped by <columnName, command>


getAlterIndexCommands

Map<String, String> getAlterIndexCommands();

Create the SQL queries to alter indexes of the table

Returns: Map<String, String> — the SQL queries to alter the indexes of the table mapped by <indexName, command>


setPrimaryKeys

DBTable setPrimaryKeys(String... keys);

Set primary keys of the table

ParameterTypeAnnotationsDescription
keysString... The keys to make primary

Returns: DBTable — the changed DBTable object


addUnique

DBTable addUnique(String... unique);

Add a unique key constellation

ParameterTypeAnnotationsDescription
keysString... The contellation of keys to make unique

Returns: DBTable — the changed DBTable object


addIndex

DBTable addIndex(String indexName, String column);

Add an index

ParameterTypeAnnotationsDescription
indexNameString The name of the index
columnString The column name to index

Returns: DBTable — the changed DBTable object


addColumn

DBTable addColumn(String columnName, String definition);

Add a column to the table

ParameterTypeAnnotationsDescription
columnNameString The name of the column
definitionString The definition of the column

Returns: DBTable — the changed DBTable object


addInt

DBTable addInt(String name);
DBTable addInt(String name, Integer def);

Add an integer column

ParameterTypeAnnotationsDescription
nameString The name of the column
defInteger (optional) The default value

Returns: DBTable — the changed DBTable object


addLong

DBTable addLong(String name);
DBTable addLong(String name, long def);

Add a long column

ParameterTypeAnnotationsDescription
nameString The name of the column
deflong (optional) The default value

Returns: DBTable — the changed DBTable object


addBigInt

DBTable addBigInt(String name);
DBTable addBigInt(String name, long def);

Add a bigint column

ParameterTypeAnnotationsDescription
nameString The name of the column
deflong (optional) The default value

Returns: DBTable — the changed DBTable object


addDouble

DBTable addDouble(String name);
DBTable addDouble(String name, double def);

Add a double column

ParameterTypeAnnotationsDescription
nameString The name of the column
defdouble (optional) The default value

Returns: DBTable — the changed DBTable object


addFloat

DBTable addFloat(String name);
DBTable addFloat(String name, float def);

Add a float column

ParameterTypeAnnotationsDescription
nameString The name of the column
deffloat (optional) The default value

Returns: DBTable — the changed DBTable object


addText

DBTable addText(String name);
DBTable addText(String name, String def);

Add a text column

ParameterTypeAnnotationsDescription
nameString The name of the column
defInteger (optional) The default value

Returns: DBTable — the changed DBTable object



Back to top

Copyright © 2026 Mr_Tesz. All rights reserved

This site uses Just the Docs, a documentation theme for Jekyll.