 # 
 # SQL Database settings
 # 
 # For most servers, the default options here are perfect. Most users will not need to bother here.
 # 
 # However, for servers wishing to use an external database, or for large servers wishing to tweak performance,
 # further configuration is made here.
 # 
 # Database version requirements:
 # - MariaDB: Requires MariaDB 10.6 or newer.
 # - MySQL: Requires MySQL 8.0 or newer.
 # - PostgreSQL: Requires PostgreSQL 12 or newer.
 # - CockroachDB: Requires the latest version. Support for this database is experimental.
 # 
 # Older versions of these respective databases are not supported.
 # 
 # Information on character sets and encoding:
 # - MariaDB: UTF8 is configured automatically
 # - MySQL: UTF8 is configured automatically
 # - PostgreSQL: UTF8 is used for the client encoding. It may be necessary to configure the database collation to use UTF8.
 # - CockroachDB: This database uses UTF8 regardless.
 # 
 # Note well:
 # To apply changes made here, use '/libertybans restart' or restart the server.
 # Using '/libertybans reload' will NOT update your database settings!
 # 
 # 
 # 
 # Settings for synchronizing multiple LibertyBans instances.
synchronization:
   # How frequently the database is polled for updates, in milliseconds.
   # Usually the default setting of 4 seconds will be sufficiently responsive without querying the database too often
   # If you want to increase responsiveness, lower this value. If you want to reduce database load, increase this value.
   # 
   # This value MUST be less than 30 seconds.
  poll-rate-millis: 4000
   # Availalble synchronization options:
   # NONE - no synchronization
   # ANSI_SQL - uses your database to synchronize punishments (called ANSI_SQL because it uses standard SQL)
   # Other options may be added in the future, upon feature request.
  mode: 'NONE'

 # All punishments are stored fully in the database, with one exception.
 # Mutes are cached for a small period of time so that players' chatting does not 
 # flood your database with queries.
 # 
 # Note: It is likely you do not need to touch this.
mute-caching:
   # How the expiration time should be used. EXPIRE_AFTER_ACCESS is the default,
   # which means that a cached mute's expiration time will be reset each time it is used.
   # 
   # Set this to EXPIRE_AFTER_WRITE if there is any program or other instance of LibertyBans
   # which may modify mutes in the database outside of this instance of LibertyBans.
   # For example, if you are using a third-party tool which can delete or add mutes,
   # EXPIRE_AFTER_WRITE is the correct semantic.
   # 
   # If you are using multi-instance synchronization, this option is set automatically
   # and you do not need to configure it.
   # 
   # EXPIRE_AFTER_WRITE will expire the cached mute after a fixed time has elapsed
   # since the mute was fetched. With EXPIRE_AFTER_ACCESS, the expiration time
   # will refresh each time the mute is used.
  expiration-semantics: 'EXPIRE_AFTER_ACCESS'
   # How long it takes a mute to expire
  expiration-time-seconds: 20

 # 
 # Connection timeout settings
 # LibertyBans uses HikariCP for connection pooling. The following settings control connection timeouts.
timeouts:
   # How long, at maximum, should LibertyBans wait when acquiring new connections, if no existing connection is available?
  connection-timeout-seconds: 14
   # How long, at maxium, should a connection in the pool last before having to be recreated?
   # "This value should be set for MariaDB or MySQL. HikariCP notes:
   # "It should be several seconds shorter than any database or infrastructure imposed connection time limit"
  max-lifetime-minutes: 25

 # Authentication details for remote databases: used for MariaDB, MySQL, PostgreSQL, and CockroachDB.
auth-details:
  host: '_LIBERTYBANS_DB_HOST_'
  port: _LIBERTYBANS_DB_PORT_
  database: '_LIBERTYBANS_DB_NAME_'
  user: '_LIBERTYBANS_DB_USERNAME_'
  password: '_LIBERTYBANS_DB_PASSWORD_'

 # The values in this section only apply when using a MariaDB or MySQL database
mariadb:
   # Connection properties to be applied to database connections
  connection-properties:
    cachePrepStmts: 'true'
    useUnicode: 'true'
    prepStmtCacheSqlLimit: '1024'
    characterEncoding: 'UTF-8'
    prepStmtCacheSize: '25'
    useServerPrepStmts: 'true'


 # The values in this section only apply when using a PostgreSQL or CockroachDB database
postgres:
   # Connection properties to be applied to database connections
  connection-properties:
    preparedStatementCacheQueries: '25'


 # Legacy option. Don't touch this unless you understand it or you're told to enable it.
use-traditional-jdbc-url: false
 # What RDMS vendor will you be using?
 # Available options:
 # 'HSQLDB' - Local HyperSQL database. No additional requirements.
 # 'MARIADB' - Requires an external MariaDB database. At least MariaDB 10.6 is required.
 # 'MYSQL' - Requires an external MySQL database. At least MySQL 8.0 is required.
 # 'POSTGRES' - Requires an external PostgreSQL database. At least PostgreSQL 12 is required.
 # 'COCKROACH' - Requires an external CockroachDB database. The latest CockroachDB is required. Warning: this option is strictly experimental.
rdms-vendor: 'MARIADB'
 # 
 # How large should the connection pool be?
 # A thread pool of similar size is derived from the connection pool size.
 # For most servers, the default option is suitable.
connection-pool-size: 6
