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.

CQL::Adapter::Sqlite

MySql

Represents the MySQL adapter.

CQL::Adapter::MySql

Postgres

Represents the PostgreSQL adapter.

CQL::Adapter::Postgres

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:

CQL::Adapter::Sqlite.sql_type(String)
# => "TEXT"

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.