Class Database.DatabaseBuilder

java.lang.Object
com.github.tadukoo.database.mysql.Database.DatabaseBuilder
All Implemented Interfaces:
Database.Build, Database.DatabaseNameOrUsername, Database.Host, Database.Logger, Database.MaxAttemptsOrBuild, Database.Password, Database.PortOrDatabaseNameOrUsername, Database.Username
Enclosing class:
Database

A Builder to use to build a Database. It takes the following parameters:
Database Parameters
Parameter Description Default or Required
logger The logger to use for logging Required
host The MySQL host url Required
port The MySQL host port Defaults to 3306
databaseName The MySQL host database name Defaults to null (used e.g. when creating the database on the server)
username The MySQL username for connecting to the Database Required
password The MySQL password for connecting to the Database Required, may be the empty string for a blank password
maxAttempts The maximum number of attempts to try a SQL transaction before giving up Defaults to 10
Version:
Alpha v.0.3
Author:
Logan Ferree (Tadukoo)
  • Field Details

    • logger

      private com.github.tadukoo.util.logger.EasyLogger logger
      The logger to use for logging
    • host

      private String host
      The MySQL host url
    • port

      private int port
      The MySQL host port
    • databaseName

      private String databaseName
      The MySQL host database name
    • username

      private String username
      The MySQL username for connecting to the Database
    • password

      private String password
      The MySQL password for connecting to the Database
    • maxAttempts

      private int maxAttempts
      The maximum number of attempts to try a SQL transaction before giving up
  • Constructor Details

    • DatabaseBuilder

      private DatabaseBuilder()
      Not allowed to instantiate outside of Database
  • Method Details