Module: SQLite3

Defined in:
lib/sqlite3.rb,
lib/sqlite3/value.rb,
lib/sqlite3/errors.rb,
lib/sqlite3/pragmas.rb,
lib/sqlite3/version.rb,
lib/sqlite3/database.rb,
lib/sqlite3/constants.rb,
lib/sqlite3/resultset.rb,
lib/sqlite3/statement.rb,
lib/sqlite3/translator.rb,
ext/sqlite3/backup.c,
ext/sqlite3/sqlite3.c,
ext/sqlite3/database.c

Defined Under Namespace

Modules: Constants, Pragmas, VersionProxy Classes: AbortException, AuthorizationException, Backup, Blob, BusyException, CantOpenException, ConstraintException, CorruptException, Database, EmptyException, Exception, FormatException, FullException, IOException, InternalException, InterruptException, LockedException, MemoryException, MismatchException, MisuseException, NotADatabaseException, NotFoundException, PermissionException, ProtocolException, RangeException, ReadOnlyException, ResultSet, SQLException, SchemaChangedException, Statement, TooBigException, Translator, UnsupportedException, Value

Constant Summary collapse

VERSION =
'1.3.11'
SQLITE_VERSION =
rb_str_new2(SQLITE_VERSION)
SQLITE_VERSION_NUMBER =
INT2FIX(SQLITE_VERSION_NUMBER)

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/sqlite3/version.rb', line 18

def self.const_missing(name)
  return super unless name == :Version
  warn(<<-eowarn) if $VERBOSE
#{caller[0]}: SQLite::Version will be removed in sqlite3-ruby version 2.0.0
  eowarn
  VersionProxy
end

.libversionObject



63
64
65
66
# File 'ext/sqlite3/sqlite3.c', line 63

static VALUE libversion(VALUE UNUSED(klass))
{
  return INT2NUM(sqlite3_libversion_number());
}

.threadsafeObject

Returns the compile time setting of the SQLITE_THREADSAFE flag. See: www.sqlite.org/c3ref/threadsafe.html



71
72
73
74
# File 'ext/sqlite3/sqlite3.c', line 71

static VALUE threadsafe_p(VALUE UNUSED(klass))
{
  return INT2NUM(sqlite3_threadsafe());
}

.threadsafe?Boolean

Was sqlite3 compiled with thread safety on?

Returns:

  • (Boolean)


14
# File 'lib/sqlite3.rb', line 14

def self.threadsafe?; threadsafe > 0; end