Parent

DBI::DBD::SQLite

DBD::SQLite - Database Driver for SQLite versions 2.x and lower.

Requires DBI and the 'sqlite-ruby' gem to work.

Only things that extend DBI's results are documented.

Constants

DESCRIPTION
VERSION

Public Class Methods

check_sql(sql) click to toggle source

Validates that the SQL has no literal NUL characters. (ASCII 0)

SQLite apparently really hates it when you do that.

It will raise DBI::DatabaseError should it find any.

# File lib/dbd/SQLite.rb, line 58
def self.check_sql(sql)
    # XXX I'm starting to think this is less of a problem with SQLite
    # and more with the old C DBD
    raise DBI::DatabaseError, "Bad SQL: SQL cannot contain nulls" if sql =~ /\00//
end
driver_name() click to toggle source

returns 'SQLite'

See DBI::TypeUtil#convert for more information.

# File lib/dbd/SQLite.rb, line 47
def self.driver_name
    "SQLite"
end
parse_type(type_name) click to toggle source

Split a type definition into parts via String#match and return the whole result.

# File lib/dbd/SQLite.rb, line 67
def self.parse_type(type_name)
    type_name.match(/^([^\(]+)(\((\d+)(,(\d+))?\))?$/)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.