Module: Amalgalite::SQLite3::Version

Defined in:
lib/amalgalite/sqlite3/version.rb,
ext/amalgalite/c/amalgalite.c

Constant Summary collapse

MAJOR =

major version number of the SQLite C library

(to_i / 1_000_000).freeze
MINOR =

minor version number of the SQLite C library

((to_i % 1_000_000) / 1_000).freeze
RELEASE =

release version number of the SQLite C library

(to_i % 1_000).freeze

Class Method Summary collapse

Class Method Details

.compiled_matches_runtime?Boolean

Returns:



31
32
33
# File 'lib/amalgalite/sqlite3/version.rb', line 31

def self.compiled_matches_runtime?
  self.compiled_version == self.runtime_version
end

.Amalgalite::SQLite3::Version.compiled_source_idString

Return the compiled SQLite C library source id as a string

Returns:

  • (String)


281
282
283
284
# File 'ext/amalgalite/c/amalgalite.c', line 281

VALUE am_sqlite3_compiled_source_id(VALUE self)
{
    return rb_str_new2( SQLITE_SOURCE_ID );
}

.Amalgalite::SQLite::Version.compiled_versionString

Return the compiletime version number as a string.

Returns:

  • (String)


256
257
258
259
# File 'ext/amalgalite/c/amalgalite.c', line 256

VALUE am_sqlite3_compiled_version(VALUE self)
{
    return rb_str_new2( SQLITE_VERSION );
}

.compiled_version_numberObject

call-seql:

Amalgalite::SQLite::Version.compiled_version_number -> Fixnum

Return the compiletime library version from the embedded version of sqlite3.



269
270
271
272
# File 'ext/amalgalite/c/amalgalite.c', line 269

VALUE am_sqlite3_compiled_version_number( VALUE self )
{
    return INT2FIX( SQLITE_VERSION_NUMBER );
}

.Amalgalite::SQLite3::Version.runtime_source_idString

Return the SQLite C library source id as a string

Returns:

  • (String)


244
245
246
247
# File 'ext/amalgalite/c/amalgalite.c', line 244

VALUE am_sqlite3_runtime_source_id(VALUE self)
{
    return rb_str_new2(sqlite3_sourceid());
}

.Amalgalite::SQLite3::Version.to_sString

Return the SQLite C library version number as a string

Returns:

  • (String)


220
221
222
223
# File 'ext/amalgalite/c/amalgalite.c', line 220

VALUE am_sqlite3_runtime_version(VALUE self)
{
    return rb_str_new2(sqlite3_libversion());
}

.Amalgalite::SQLite3.VersionFixnum

Return the SQLite C library version number as an integer

Returns:

  • (Fixnum)


232
233
234
235
# File 'ext/amalgalite/c/amalgalite.c', line 232

VALUE am_sqlite3_runtime_version_number(VALUE self)
{
    return INT2FIX(sqlite3_libversion_number());
}

.to_aObject

call-seq:

Amalgalite::SQLite3::Version.to_a -> [ MAJOR, MINOR, RELEASE ]

Return the SQLite C library version number as an array of MAJOR, MINOR, RELEASE



27
28
29
# File 'lib/amalgalite/sqlite3/version.rb', line 27

def self.to_a
  [ MAJOR, MINOR, RELEASE ]
end

.Amalgalite::SQLite3.VersionFixnum

Return the SQLite C library version number as an integer

Returns:

  • (Fixnum)


232
233
234
235
# File 'ext/amalgalite/c/amalgalite.c', line 232

VALUE am_sqlite3_runtime_version_number(VALUE self)
{
    return INT2FIX(sqlite3_libversion_number());
}

.Amalgalite::SQLite3::Version.to_sString

Return the SQLite C library version number as a string

Returns:

  • (String)


220
221
222
223
# File 'ext/amalgalite/c/amalgalite.c', line 220

VALUE am_sqlite3_runtime_version(VALUE self)
{
    return rb_str_new2(sqlite3_libversion());
}