abstract class DBX::Adapter::Base

Overview

Base adapter.

Direct Known Subclasses

Defined in:

adapter/adapter.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(db : DB::Database) #

Class Method Detail

def self.builder_class : QueryBuilder.class #

Returns query builder class.


def self.new_builder : QueryBuilder #

Returns a new query builder instance.


Instance Method Detail

abstract 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.


def db : DB::Database #

def new_builder : QueryBuilder #

Returns a new query builder instance.