enum CQL::Adapter
Enum
< Comparable
< Value
< Object
The CQL::Adapter
enum represents different database adapters such as SQLite, MySQL, and PostgreSQL.
Constants
Sqlite
Represents the SQLite adapter.
MySql
Represents the MySQL adapter.
Postgres
Represents the PostgreSQL adapter.
Methods
def sql_type(type : Type)
Returns the SQL type for the given data type.
@param type [Type] The data type.
@return [String] The SQL type as a string.
Example:
def my_sql?
Checks if the adapter is MySQL.
@return [Bool]
true
if the adapter is MySQL,false
otherwise.
def postgres?
Checks if the adapter is PostgreSQL.
@return [Bool]
true
if the adapter is PostgreSQL,false
otherwise.