abstract class DB::Statement

Overview

Represents a prepared query in a Connection. It should be created by QueryMethods.

Note to implementors

  1. Subclass Statements
  2. Statements are created from a custom driver Connection#prepare method.
  3. #perform_query executes a query that is expected to return a ResultSet
  4. #perform_exec executes a query that is expected to return an ExecResult
  5. #do_close is called to release the statement resources.

Included Modules

Defined in:

db/statement.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from module DB::StatementMethods

exec(args : Array) : ExecResult
exec : ExecResult
exec(*args) : ExecResult
exec
, query(*args, &block)
query(args : Array) : ResultSet
query : ResultSet
query(*args) : ResultSet
query
, scalar(*args) scalar

Instance methods inherited from module DB::Disposable

close close, closed? closed?

Class Method Detail

def self.new(connection : Connection) #

[View source]

Instance Method Detail

def exec(args : Array) #

[View source]
def exec #

[View source]
def exec(*args) #

[View source]
def query(args : Array) #

[View source]
def query #

[View source]
def query(*args) #

[View source]
def release_connection #

[View source]