Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public final class Engines
- Object
- Engines
The server engines a database URL can name: their schemes, canonical names and default ports.
Nothing here opens a connection or decides which engines an application
carries – that is whichever engine classes it names (see
ServerSession.Connector). This class knows every engine’s URL scheme all
the same, so that a URL naming an engine is recognised as one rather than
opened as a SQLite file called “postgres:”.
Fields
Methods
public static String named(String url) | The engine whose scheme the URL opens with, or null when it has none of them and is therefore a SQLite path. |
public static int defaultPort(String engine) | The port an engine listens on when the URL gives none. |
public static String canonical(String name) | The canonical name of an engine as the build property spells it, or null for a name that is none of them. |
Inherited methods
Field details
SQLITE
public static final String SQLITE = "sqlite"POSTGRES
public static final String POSTGRES = "postgres"MYSQL
public static final String MYSQL = "mysql"SQLSERVER
public static final String SQLSERVER = "sqlserver"ORACLE
public static final String ORACLE = "oracle"Method details
named
public static String named(String url)The engine whose scheme the URL opens with, or null when it has none of them and is therefore a SQLite path.
RFC 3986 makes a scheme case insensitive. regionMatches rather than toLowerCase: String.toLowerCase is locale sensitive and this runtime has no Locale to ask for the root one, so on a Turkish host the I of a scheme folds to a dotless i and stops matching.
defaultPort
public static int defaultPort(String engine)canonical
public static String canonical(String name)