Module: Libsql::SQLite3::Version

Defined in:
lib/libsql/sqlite3/version.rb,
ext/libsql/c/libsql_ext.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/libsql/sqlite3/version.rb', line 31

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

.Libsql::SQLite3::Version.compiled_source_idString

Return the compiled SQLite C library source id as a string

Returns:

  • (String)


282
283
284
285
# File 'ext/libsql/c/libsql_ext.c', line 282

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

.Libsql::SQLite::Version.compiled_versionString

Return the compiletime version number as a string.

Returns:

  • (String)


257
258
259
260
# File 'ext/libsql/c/libsql_ext.c', line 257

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

.compiled_version_numberObject

call-seql:

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

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



270
271
272
273
# File 'ext/libsql/c/libsql_ext.c', line 270

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

.Libsql::SQLite3::Version.runtime_source_idString

Return the SQLite C library source id as a string

Returns:

  • (String)


245
246
247
248
# File 'ext/libsql/c/libsql_ext.c', line 245

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

.Libsql::SQLite3::Version.to_sString

Return the SQLite C library version number as a string

Returns:

  • (String)


221
222
223
224
# File 'ext/libsql/c/libsql_ext.c', line 221

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

.Libsql::SQLite3.VersionFixnum

Return the SQLite C library version number as an integer

Returns:

  • (Fixnum)


233
234
235
236
# File 'ext/libsql/c/libsql_ext.c', line 233

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

.to_aObject

call-seq:

::Libsql::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/libsql/sqlite3/version.rb', line 27

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

.Libsql::SQLite3.VersionFixnum

Return the SQLite C library version number as an integer

Returns:

  • (Fixnum)


233
234
235
236
# File 'ext/libsql/c/libsql_ext.c', line 233

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

.Libsql::SQLite3::Version.to_sString

Return the SQLite C library version number as a string

Returns:

  • (String)


221
222
223
224
# File 'ext/libsql/c/libsql_ext.c', line 221

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