firebirdsql

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2017 License: MIT Imports: 25 Imported by: 0

README

======================================
firebirdsql (Go firebird sql driver)
======================================

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

.. image:: https://travis-ci.org/nakagami/firebirdsql.svg?branch=master
    :target: https://travis-ci.org/nakagami/firebirdsql

Requirements
-------------

* Firebird 2.1 or higher
* Golang 1.7 or higher

Installation
-------------

::

   $ go get github.com/cznic/mathutil
   $ go get github.com/nyarla/go-crypt
   $ go get github.com/nakagami/firebirdsql


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

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

- role: Role name.
- auth_plugin_name: Authentication plugin name for FB3. Srp or Legacy_Auth are available. Default is Srp.
- wire_crypt: Enable wire data encryption or not. It is for FB3 server. Default is true.

Documentation

Overview

*************************************************************************** The contents of this file are subject to the Interbase Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.Inprise.com/IPL.html

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

****************************************************************************

Index

Constants

View Source
const (
	ISC_TIME_SECONDS_PRECISION = 10000

	// Protocol Version
	PROTOCOL_VERSION13 = 13

	CNCT_user              = 1
	CNCT_passwd            = 2
	CNCT_host              = 4
	CNCT_group             = 5
	CNCT_user_verification = 6
	CNCT_specific_data     = 7
	CNCT_plugin_name       = 8
	CNCT_login             = 9
	CNCT_plugin_list       = 10
	CNCT_client_crypt      = 11
)
View Source
const (
	ISOLATION_LEVEL_READ_COMMITED_LEGACY = iota
	ISOLATION_LEVEL_READ_COMMITED
	ISOLATION_LEVEL_REPEATABLE_READ
	ISOLATION_LEVEL_SERIALIZABLE
	ISOLATION_LEVEL_READ_COMMITED_RO
)
View Source
const (
	SRP_KEY_SIZE      = 128
	SRP_SALT_SIZE     = 32
	DEBUG_PRIVATE_KEY = "60975527035CF2AD1989806F0407210BC81EDC04E2762A56AFD529DDDA2D4393"
	DEBUG_SRP         = false
)
View Source
const (
	PLUGIN_LIST       = "Srp,Legacy_Auth"
	BUFFER_LEN        = 1024
	MAX_CHAR_LENGTH   = 32767
	BLOB_SEGMENT_SIZE = 32000
)
View Source
const (
	SQL_TYPE_TEXT      = 452
	SQL_TYPE_VARYING   = 448
	SQL_TYPE_SHORT     = 500
	SQL_TYPE_LONG      = 496
	SQL_TYPE_FLOAT     = 482
	SQL_TYPE_DOUBLE    = 480
	SQL_TYPE_D_FLOAT   = 530
	SQL_TYPE_TIMESTAMP = 510
	SQL_TYPE_BLOB      = 520
	SQL_TYPE_ARRAY     = 540
	SQL_TYPE_QUAD      = 550
	SQL_TYPE_TIME      = 560
	SQL_TYPE_DATE      = 570
	SQL_TYPE_INT64     = 580
	SQL_TYPE_BOOLEAN   = 32764
	SQL_TYPE_NULL      = 32766
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL