class FluentQuery::Driver

Represents abstract query driver. @abstract

Attributes

connection[R]

Public Class Methods

new(connection) click to toggle source

Initializes driver.

# File lib/fluent-query/driver.rb, line 25
def initialize(connection)
    if self.instance_of? FluentQuery::Driver
        not_implemented
    end

    @connection = connection
end

Public Instance Methods

build_query(query) click to toggle source

Builds given query. @abstract

# File lib/fluent-query/driver.rb, line 107
def build_query(query)
    not_implemented
end
check_conditionally(query, sym, *args, &block) click to toggle source

Checks query conditionally. It’s called after first token of the query.

@since 0.9.2

# File lib/fluent-query/driver.rb, line 285
def check_conditionally(query, sym, *args, &block)
end
close_connection!() click to toggle source

Closes the connection. @abstract

# File lib/fluent-query/driver.rb, line 240
def close_connection!
    not_implemented
end
correct_token(name, args) click to toggle source

Corrects token before it’s pushed to the token. So allows to modify data assigned to the query from driver level.

@since 0.9.2

# File lib/fluent-query/driver.rb, line 296
def correct_token(name, args)
    return [name, args]
end
do(query) click to toggle source

Executes the query and returns count of the changed/inserted rows. @abstract

# File lib/fluent-query/driver.rb, line 260
def do(query)
    not_implemented
end
execute(query) click to toggle source

Executes the query. @abstract

# File lib/fluent-query/driver.rb, line 250
def execute(query)
    not_implemented
end
known_token?(group, token_name) click to toggle source

Indicates token is known. @abstract

# File lib/fluent-query/driver.rb, line 52
def known_token?(group, token_name)
    not_implemented
end
native_connection() click to toggle source

Returns native connection. @abstract

# File lib/fluent-query/driver.rb, line 230
def native_connection
    not_implemented
end
null() click to toggle source

Creates system-dependent NULL. @abstract

# File lib/fluent-query/driver.rb, line 172
def null
    not_implemented
end
open_connection(settings) click to toggle source

Opens the connection.

It’s lazy, so it will open connection before first request through {@link native_connection()} method.

@abstract

# File lib/fluent-query/driver.rb, line 220
def open_connection(settings)
    not_implemented
end
operator_token?(token_name) click to toggle source

Indicates, token is operator. @abstract

# File lib/fluent-query/driver.rb, line 62
def operator_token?(token_name)
    not_implemented
end
prepare(query) click to toggle source

Generates prepared query. Should be noted, if driver doesn’t support query preparing, it should be not_implemented and unimplemented.

@abstract

# File lib/fluent-query/driver.rb, line 273
def prepare(query)
    not_implemented
end
query_class() click to toggle source

Indicates which query subclass to use. @abstract

# File lib/fluent-query/driver.rb, line 97
def query_class
    not_implemented
end
quote_boolean(boolean) click to toggle source

Quotes system-dependent boolean value. @abstract

# File lib/fluent-query/driver.rb, line 182
def quote_boolean(boolean)
    not_implemented
end
quote_date_time(date) click to toggle source

Quotes system-dependent date value. @abstract

# File lib/fluent-query/driver.rb, line 192
def quote_date_time(date)
    not_implemented
end
quote_equality(datatype, mode = :comparing) click to toggle source

Returns correct equality operator for given datatype.

Must handle two modes:

* "assigning" which classicaly keeps for example the '=' operator,
* "comparing" which sets for example 'IS' operator for booleans.

@abstract

# File lib/fluent-query/driver.rb, line 87
def quote_equality(datatype, mode = :comparing)
    not_implemented
end
quote_float(float) click to toggle source

 Quotes float.

@abstract
# File lib/fluent-query/driver.rb, line 152
def quote_float(float)
    not_implemented
end
quote_identifier(field) click to toggle source

Quotes field by field quoting. @abstract

# File lib/fluent-query/driver.rb, line 162
def quote_identifier(field)
    not_implemented
end
quote_integer(integer) click to toggle source

 Quoting integer.

@abstract
# File lib/fluent-query/driver.rb, line 142
def quote_integer(integer)
    not_implemented
end
quote_operator(operator) click to toggle source

Returns operator string according to operator symbol. @abstract

# File lib/fluent-query/driver.rb, line 72
def quote_operator(operator)
    not_implemented
end
quote_placeholder(placeholder) click to toggle source

Returns preparation placeholder according to given library placeholder.

@abstract

# File lib/fluent-query/driver.rb, line 119
def quote_placeholder(placeholder)
    not_implemented
end
quote_string(string) click to toggle source

 Quotes string.

@abstract
# File lib/fluent-query/driver.rb, line 132
def quote_string(string)
    not_implemented
end
quote_subquery(subquery) click to toggle source

Quotes system-dependent subquery. @abstract

# File lib/fluent-query/driver.rb, line 202
def quote_subquery(subquery)
    not_implemented
end
relevant_method?(name) click to toggle source

Indicates, method is relevant for the driver. @abstract

# File lib/fluent-query/driver.rb, line 41
def relevant_method?(name)
    not_implemented
end