MariaDBTable
| Type | 🔵 Class |
| Package | io.github.mrtesz.teszcore.db.table.mariadb |
| GitHub | MariaDBTable.java |
| Implements | DBTable.java |
Description
Builder class to configure MariaDB tables
Constructor
MariaDBTable(String name);
| Parameter | Type | Annotations | Description |
|---|---|---|---|
name | String | @NotNull | The name of the table |
Methods
getName
implemented from DBTable.java
addColumn
implemented from DBTable.java
setPrimaryKeys
implemented from DBTable.java
addUnique
implemented from DBTable.java
addInt
implemented from DBTable.java
addLong
implemented from DBTable.java
addBigInt
implemented from DBTable.java
addDouble
implemented from DBTable.java
addFloat
implemented from DBTable.java
addText
implemented from DBTable.java
addVarchar
MariaDBTable addVarchar(@NotNull String name, int length);
MariaDBTable addVarchar(@NotNull String name, int length, String def);
Add a varchar column
| Parameter | Type | Annotations | Description |
|---|---|---|---|
name | String | @NotNull | The name of the column |
length | int | @NotNull | The length of the varchar |
def | Integer | (optional) The default value |
Returns: MariaDBTable — the changed MariaDBTable object
addMediumText
MariaDBTable addMediumText(@NotNull String name);
MariaDBTable addMediumText(@NotNull String name, String def);
Add a mediumtext column
| Parameter | Type | Annotations | Description |
|---|---|---|---|
name | String | @NotNull | The name of the column |
def | Integer | (optional) The default value |
Returns: MariaDBTable — the changed MariaDBTable object
addLongText
MariaDBTable addLongText(@NotNull String name);
MariaDBTable addLongText(@NotNull String name, String def);
Add a longtext column
| Parameter | Type | Annotations | Description |
|---|---|---|---|
name | String | @NotNull | The name of the column |
def | Integer | (optional) The default value |
Returns: MariaDBTable — the changed MariaDBTable object
addDate
MariaDBTable addDate(@NotNull String name);
Add a Date column
| Parameter | Type | Annotations | Description |
|---|---|---|---|
name | String | @NotNull | The name of the column |
Returns: MariaDBTable — the changed MariaDBTable object
addDateNow
MariaDBTable addDateNow(@NotNull String name);
Add a Date column with the current date as default
| Parameter | Type | Annotations | Description |
|---|---|---|---|
name | String | @NotNull | The name of the column |
Returns: MariaDBTable — the changed MariaDBTable object
addTimestamp
MariaDBTable addTimestamp(@NotNull String name);
Add a timestamp column
| Parameter | Type | Annotations | Description |
|---|---|---|---|
name | String | @NotNull | The name of the column |
Returns: MariaDBTable — the changed MariaDBTable object
addTimestampNow
MariaDBTable addTimestampNow(@NotNull String name);
Add a timestamp column with the current timestamp as default
| Parameter | Type | Annotations | Description |
|---|---|---|---|
name | String | @NotNull | The name of the column |
Returns: MariaDBTable — the changed MariaDBTable object
addIndex
implemented from DBTable.java
getCreateCommand
implemented from DBTable.java
getAlterColumnsCommand
implemented from DBTable.java
getAlterIndexCommands
implemented from DBTable.java
copy
implemented from Copyable.java
T: MariaDBTable