• Stars
    star
    227
  • Rank 175,900 (Top 4 %)
  • Language
    Go
  • License
    MIT License
  • Created about 11 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Firebird RDBMS sql driver for Go (golang)

firebirdsql (Go firebird sql driver)

Firebird RDBMS https://firebirdsql.org SQL driver for Go

Requirements

  • Firebird 2.5 or higher
  • Golang 1.18 or higher

Example

package main

import (
    "fmt"
    "database/sql"
    _ "github.com/nakagami/firebirdsql"
)

func main() {
    var n int
    conn, _ := sql.Open("firebirdsql", "user:password@servername/foo/bar.fdb")
    defer conn.Close()
    conn.QueryRow("SELECT Count(*) FROM rdb$relations").Scan(&n)
    fmt.Println("Relations count=", n)

}

See also driver_test.go

   package main

      import (
       "fmt"
       "github.com/nakagami/firebirdsql"
   )

   func main() {
       dsn := "user:password@servername/foo/bar.fdb"
       events := []string{"my_event", "order_created"}
       fbEvent, _ := firebirdsql.NewFBEvent(dsn)
       defer fbEvent.Close()
       sbr, _ := fbEvent.Subscribe(events, func(event firebirdsql.Event) { //or use SubscribeChan
           fmt.Printf("event: %s, count: %d, id: %d, remote id:%d \n", event.Name, event.Count, event.ID, event.RemoteID)
       })
       defer sbr.Unsubscribe()
       go func() {
               fbEvent.PostEvent(events[0])
               fbEvent.PostEvent(events[1])
       }()
       <- make(chan struct{}) //wait
   }

See also _example

Connection string

user:password@servername[:port_number]/database_name_or_file[?params1=value1[&param2=value2]...]

General

  • user: login user
  • password: login password
  • servername: Firebird server's host name or IP address.
  • port_number: Port number. default value is 3050.
  • database_name_or_file: Database path (or alias name).

Optional

param1, param2... are

Name Description Default Note
auth_plugin_name Authentication plugin name. Srp256 Srp256/Srp/Legacy_Auth are available.
column_name_to_lower Force column name to lower false For "github.com/jmoiron/sqlx"
role Role name
timezone Time Zone name For Firebird 4.0+
wire_crypt Enable wire data encryption or not. true For Firebird 3.0+
charset Firebird Charecter Set

GORM for Firebird

See https://github.com/flylink888/gorm-firebird

More Repositories

1

pyfirebirdsql

Python DBAPI module for FirebirdSQL
Python
71
star
2

micropg

PostgreSQL database driver for MicroPython
Python
25
star
3

firebirdex

Elixir database driver for Firebird
Elixir
22
star
4

efirebirdsql

Erlang Firebird client library.
Erlang
20
star
5

nmongo

Yet another MongoDB 3.x driver
Python
20
star
6

pydrda

Pure python Db2 and Apache Derby database driver
Python
12
star
7

minipg

Yet another Python PostgreSQL database driver
Python
12
star
8

django-cymysql

django mysql database backend with cymysql
Python
12
star
9

djfirebirdsql

Django Firebird database backend
Python
10
star
10

firebirust

Firebird RDBMS driver for Rust
Rust
10
star
11

awabi

A morphological analyzer using mecab dictionary
Rust
9
star
12

Awabi.jl

A morphological analyzer using mecab dictionary
Julia
8
star
13

reportlab

Python
8
star
14

Firebird.jl

A Julia interface to the Firebird RDBMS
Julia
7
star
15

minitds

MS SQLServer database driver
Python
6
star
16

planetplanet

RSS aggregation site
Python
5
star
17

csvdb

Csv data access package like PEP 249 api.
Python
4
star
18

JbConsole

Python
4
star
19

janomecabdic

MeCab dictionary access library for janome
HTML
4
star
20

tinytls

TLS1.3 protocol wrapper
Python
3
star
21

Products.FirebirdDA

Zope Database adapter for Firebird
Python
2
star
22

ecto_firebird

Ecto Firebird adapter
Elixir
2
star
23

planet-on-dotcloud

Python
2
star
24

toyredis

Python
2
star
25

django-minipg

Django Postgresql database backend
Python
1
star
26

planetgae

RSS aggregation site (Python/GAE)
Python
1
star
27

pure-pyawabi

Python
1
star
28

Products.Zch

Python
1
star
29

csvsqlite3

Csv data access package like PEP 249 api.
Python
1
star
30

Products.ZSQLiteDA

SQLite Database adapter for Zope
Python
1
star
31

flask_websocket_example

https://gist.github.com/lrvick/1185629 fork
Python
1
star
32

PyConJP2012LT

Python Conference Japan 2012 Lightning talk
Python
1
star
33

sqliteio

SQLite3 file io library
Python
1
star
34

pyplotsixel

Python
1
star