MariaDBTable

  
Type🔵 Class
Packageio.github.mrtesz.teszcore.db.table.mariadb
GitHubMariaDBTable.java
ImplementsDBTable.java

Description

Builder class to configure MariaDB tables


Constructor

MariaDBTable(String name);
ParameterTypeAnnotationsDescription
nameString@NotNullThe 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

ParameterTypeAnnotationsDescription
nameString@NotNullThe name of the column
lengthint@NotNullThe length of the varchar
defInteger (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

ParameterTypeAnnotationsDescription
nameString@NotNullThe name of the column
defInteger (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

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

Returns: MariaDBTable — the changed MariaDBTable object


addDate

MariaDBTable addDate(@NotNull String name);

Add a Date column

ParameterTypeAnnotationsDescription
nameString@NotNullThe 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

ParameterTypeAnnotationsDescription
nameString@NotNullThe name of the column

Returns: MariaDBTable — the changed MariaDBTable object


addTimestamp

MariaDBTable addTimestamp(@NotNull String name);

Add a timestamp column

ParameterTypeAnnotationsDescription
nameString@NotNullThe 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

ParameterTypeAnnotationsDescription
nameString@NotNullThe 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



Back to top

Copyright © 2026 Mr_Tesz. All rights reserved

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