unit uRDB;

interface

uses Rubies, RDBHandle, DB;

const
  RDBDLL = 'rdb.so';

var
  mRDB,
  rb_eDatabaseError: Tvalue;
  Handle: TRDBHandle;

function ap_mRDB: Tvalue;
function ap_eDatabaseError: Tvalue;
function RDBGetHandle: TRDBHandle;

implementation

uses Pythia;

function ap_mRDB: Tvalue;
begin
  result := mRDB;
end;

function ap_eDatabaseError: Tvalue;
begin
  result := rb_eDatabaseError;
end;

function RDBGetHandle: TRDBHandle;
begin
  result := Handle;
end;

exports
  ap_mRDB,
  ap_eDatabaseError;

initialization
  Handle := TRDBHandle.Create;
finalization
  Handle.Free;
end.
