Module: Hanami::Model::Sql
- Defined in:
- gems/gems/hanami-model-1.3.2/lib/hanami/model/sql.rb,
gems/gems/hanami-model-1.3.2/lib/hanami/model/sql/types.rb,
gems/gems/hanami-model-1.3.2/lib/hanami/model/sql/console.rb,
gems/gems/hanami-model-1.3.2/lib/hanami/model/sql/entity/schema.rb,
gems/gems/hanami-model-1.3.2/lib/hanami/model/sql/consoles/mysql.rb,
gems/gems/hanami-model-1.3.2/lib/hanami/model/sql/consoles/sqlite.rb,
gems/gems/hanami-model-1.3.2/lib/hanami/model/sql/consoles/abstract.rb,
gems/gems/hanami-model-1.3.2/lib/hanami/model/sql/consoles/postgresql.rb,
gems/gems/hanami-model-1.3.2/lib/hanami/model/sql/types/schema/coercions.rb
Overview
SQL adapter
Defined Under Namespace
Modules: Consoles, Entity, Types
Class Method Summary collapse
-
.asc(column) ⇒ String
Returns SQL fragment for ascending order for the given column.
-
.desc(column) ⇒ String
Returns SQL fragment for descending order for the given column.
-
.function(name) ⇒ String
Returns a SQL fragment that references a database function by the given name This is useful for database migrations.
-
.literal(string) ⇒ String
Returns a literal SQL fragment for the given SQL fragment.
Class Method Details
.asc(column) ⇒ String
Returns SQL fragment for ascending order for the given column
Source: | on GitHub
def self.asc(column) Sequel.asc(column) end |
.desc(column) ⇒ String
Returns SQL fragment for descending order for the given column
Source: | on GitHub
def self.desc(column) Sequel.desc(column) end |
.function(name) ⇒ String
Returns a SQL fragment that references a database function by the given name This is useful for database migrations
Source: | on GitHub
def self.function(name) Sequel.function(name) end |
.literal(string) ⇒ String
Returns a literal SQL fragment for the given SQL fragment. This is useful for database migrations
Source: | on GitHub
def self.literal(string) Sequel.lit(string) end |