class DBX::Adapter::PostgreSQL
- DBX::Adapter::PostgreSQL
- DBX::Adapter::Base
- Reference
- Object
Overview
PostgreSQL adapter
Defined in:
adapter/pg.crClass Method Summary
-
.builder_class : DBX::QueryBuilder.class
Returns query builder class adapted for PostgreSQL.
Instance Method Summary
-
#builder_class : DBX::QueryBuilder.class
Returns query builder class adapted for PostgreSQL.
-
#create!(query : DBX::Query, data : Hash | NamedTuple, as types, returning : DBX::QueryBuilder::OneOrMoreFieldsType = "*", pk_name : DBX::QueryBuilder::FieldType = :id, pk_type = ::Union(Int64, ::Nil))
Creates a new record and returns.
Instance methods inherited from class DBX::Adapter::Base
create!(query : DBX::Query, data : Hash | NamedTuple, as types, returning : DBX::QueryBuilder::OneOrMoreFieldsType = "*", pk_name : DBX::QueryBuilder::FieldType = :id, pk_type = ::Union(Int64, ::Nil))
create!,
db : DB::Database
db,
new_builder : QueryBuilder
new_builder
Constructor methods inherited from class DBX::Adapter::Base
new(db : DB::Database)
new
Class methods inherited from class DBX::Adapter::Base
builder_class : QueryBuilder.class
builder_class,
new_builder : QueryBuilder
new_builder
Class Method Detail
Returns query builder class adapted for PostgreSQL.
Instance Method Detail
Returns query builder class adapted for PostgreSQL.
def create!(query : DBX::Query, data : Hash | NamedTuple, as types, returning : DBX::QueryBuilder::OneOrMoreFieldsType = "*", pk_name : DBX::QueryBuilder::FieldType = :id, pk_type = ::Union(Int64, ::Nil))
#
Creates a new record and returns.
See DBX::Query#create!
for more details.
To get recorded data, PostgreSQL adapter use
RETURNING
SQL statement. pk_name and pk_type are useless and ignored, thanks PostgreSQLRETURNING
that makes it simpler and more efficient :)