Need help with firebirdsql?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

nakagami
141 Stars 40 Forks MIT License 621 Commits 8 Opened issues

Description

Firebird RDBMS sql driver for Go (golang)

Services available

!
?

Need anything else?

Contributors list

# 110,896
C
mariadb
MySQL
SQL
525 commits
# 410,848
C
gorouti...
gorouti...
golang
12 commits
# 624,594
C
Go
5 commits
# 756,277
C
Go
5 commits
# 378,484
C
configu...
evaluat...
golang
4 commits
# 386,293
Shell
C
C++
React N...
3 commits
# 272,558
apache
nginx
h5ai
init-sy...
2 commits
# 790,206
C
Go
1 commit
# 329,001
Clojure
Shell
HTML
1 commit
# 74,777
eye-can...
Shell
Lua
wxwidge...
1 commit
# 790,207
C
Go
1 commit
# 138,918
Ruby
Shell
Sass
truffle
1 commit
# 5,438
prometh...
SQL
Git
apt
1 commit

======================================

firebirdsql (Go firebird sql driver)

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

Requirements

  • Firebird 2.5 or higher
  • Golang 1.13 or higher

Example

::

package main

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

func main() { var n int conn, _ := sql.Open("firebirdsql", "user:[email protected]/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:[email protected]/foo/bar.fdb" events := []string{"myevent", "ordercreated"} 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:[email protected][:portnumber]/databasenameorfile[?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.
  • databasenameor_file: Database path (or alias name).

Optional

param1, param2... are

.. csv-table:: :header: Name,Description,Default,Note

authpluginname,Authentication plugin name.,Srp,Srp256/Srp/LegacyAuth are available. columnnametolower,Force column name to lower,false,For "github.com/jmoiron/sqlx" role,Role name, tzname, Time Zone name, For Firebird 4.0+ wire_crypt,Enable wire data encryption or not.,true,For Firebird 3.0+ charset, Firebird Charecter Set,

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.