|
Project Information
Featured
Downloads
Links
|
fbclient 0.5.0 is out! Read the full story.Fbclient is a binding of the Firebird client library for the Lua language (why?). It comes as a collection of Lua modules that allows you to connect and execute queries against the Firebird Relational Database. It aims at full API coverage. Features
InstallationYou can download and install fbclient automatically using LuaRocks (see rockspec and package): luarocks install fbclient Alternatively, you can download the sources manually, and add the fbclient directory to package.path, as with any Lua-only package. The dependencies are:
You also need the fbclient (or fbembed) shared library itself plus its own dependencies. If you have Firebird installed on your client host, then it is already installed system-wide. Otherwise, you can find it in the binary distribution of Firebird for your platform (links to the right). Copy firebird.msg and all the shared libraries from bin to a place where your OS can find and load them. You can also get all the files from the test suite (see downloads section). Usagelocal fb = require 'fbclient.class'
local at = fb.attach('localhost/3050:/my/db.fdb', 'SYSDBA', 'masterkey')
local sql = 'select id, name from inventions where inventor = ? and name like ?'
for st, id, name in at:exec(sql, 'Farnsworth', '%booth') do
print(id, name)
end
at:close()Ok, fbclient can do a little more than that. Here's the main modules:
If going procedural you may want to grab the Interbase 6 API Guide and Firebird 2.1 and 2.5 Release Notes (links to the right). Hopefully, you'd still prefer it to plain C. FeedbackIf you have any suggestions, don't like the API or just want to share your experience using the library, drop me a note at cosmin.apreutesei@gmail.com. You can also leave comments on every page of the wiki, or beside the source code. Please use the issue tracker for doing bugs & feat requests, this way they stick and you can track their progress. When reporting non-obvious bugs, it would help to specify your OS, server version, fbclient.dll (.so) version and database ODS version. Also, try downloading and running the automated test suite for your platform (it's very easy to setup) and see if it runs without any failures and that the output values look good.
Copyright © Cosmin Apreutesei 2009 fbclient is open-source software, distributed under the terms of the MIT License. |