model/DatabaseEngine.java

floci-io/floci · src/main/java/io/github/hectorvent/floci/services/rds/model/DatabaseEngine.java · java · MIT
database, Database / ORM

Enum representing supported database engines with default ports and username length limits.

// Source: https://github.com/floci-io/floci | License: MIT | Copyright 2025 Floci and its contributors
// Provided via justclaw.it.com; keep this notice with the code.
package io.github.hectorvent.floci.services.rds.model;

import io.quarkus.runtime.annotations.RegisterForReflection;

@RegisterForReflection
public enum DatabaseEngine {
    POSTGRES, MYSQL, MARIADB, SQLSERVER;

    public int defaultPort() {
        return switch (this) {
            case POSTGRES -> 5432;
            case MYSQL, MARIADB -> 3306;
            case SQLSERVER -> 1433;
        };
    }

    // The API reference documents 16 characters for every engine, but RDS accepts longer
    // master usernames on PostgreSQL and MySQL. These are the limits the service enforces.
    public int maxMasterUsernameLength() {
  

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key