Skip to content

nakagami/firebirdex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebirdex

Elixir database driver for Firebird https://firebirdsql.org/

Requirements

Firebird 2.5 or higher

Preparation

Add :firebirdex to your dependencies:

def deps() do
  [
    {:firebirdex, "~> 0.3.11"}
  ]
end

Example

If the password is set in the FIREBIRD_PASSWORD environment variable, you can omit the password in the opts variable below.

opts = [
  hostname: "servername",
  username: "sysdba",
  password: "password",
  database: "/some/where/sample.fdb",
]

{:ok, pid} = Firebirdex.start_link(opts)

{:ok, %Firebirdex.Result{} = result} = Firebirdex.query(pid, "SELECT * FROM rdb$relations where rdb$system_flag = ?", [1])

IO.inspect result.columns
IO.inspect Enum.at result.rows, 0

# Same as above (may raise an exception)
result = Firebirdex.query!(pid, "SELECT * FROM rdb$relations where rdb$system_flag = ?", [1])

About

Elixir database driver for Firebird

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages