Sha256: 149aa8927e8cea3e84efceb3060f4fd74fc57024103876b2ec5232696093f0cb

Contents?: true

Size: 947 Bytes

Versions: 7

Compression:

Stored size: 947 Bytes

Contents

#include <sqlite3_ruby.h>

VALUE mSqlite3;
VALUE cSqlite3Blob;

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

void Init_sqlite3_native()
{
  /*
   * SQLite3 is a wrapper around the popular database
   * sqlite[http://sqlite.org].
   *
   * For an example of usage, see SQLite3::Database.
   */
  mSqlite3     = rb_define_module("SQLite3");

  /* A class for differentiating between strings and blobs, when binding them
   * into statements.
   */
  cSqlite3Blob = rb_define_class_under(mSqlite3, "Blob", rb_cString);

  /* Initialize the sqlite3 library */
  sqlite3_initialize();

  init_sqlite3_database();
  init_sqlite3_statement();
  init_sqlite3_backup();

  rb_define_singleton_method(mSqlite3, "libversion", libversion, 0);
  rb_define_const(mSqlite3, "SQLITE_VERSION", rb_str_new2(SQLITE_VERSION));
  rb_define_const(mSqlite3, "SQLITE_VERSION_NUMBER", INT2FIX(SQLITE_VERSION_NUMBER));
}

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
sqlite3-1.3.3-x86-mswin32-60 ext/sqlite3/sqlite3.c
sqlite3-1.3.3-x86-mingw32 ext/sqlite3/sqlite3.c
sqlite3-1.3.3 ext/sqlite3/sqlite3.c
sqlite3-1.3.3.beta.1 ext/sqlite3/sqlite3.c
sqlite3-ruby-1.3.2 ext/sqlite3/sqlite3.c
sqlite3-ruby-1.3.2-x86-mswin32-60 ext/sqlite3/sqlite3.c
sqlite3-ruby-1.3.2-x86-mingw32 ext/sqlite3/sqlite3.c