oci8 - ActiveState ActiveGo 1.8
...

Package oci8

import "github.com/mattn/go-oci8"
Overview
Index

Overview ▾

Index ▾

func CByte(b []byte) *C.char
func GetLastInsertId(id int64) string
func QueryEscape(s string) string
func QueryUnescape(s string) (string, error)
type DSN
    func ParseDSN(dsnString string) (dsn *DSN, err error)
type EscapeError
    func (e EscapeError) Error() string
type OCI8Conn
    func (c *OCI8Conn) Begin() (driver.Tx, error)
    func (c *OCI8Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
    func (c *OCI8Conn) Close() error
    func (c *OCI8Conn) Exec(query string, args []driver.Value) (driver.Result, error)
    func (c *OCI8Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
    func (c *OCI8Conn) Ping(ctx context.Context) error
    func (c *OCI8Conn) Prepare(query string) (driver.Stmt, error)
    func (c *OCI8Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)
    func (c *OCI8Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
type OCI8Driver
    func (d *OCI8Driver) Open(dsnString string) (connection driver.Conn, err error)
type OCI8Result
    func (r *OCI8Result) LastInsertId() (int64, error)
    func (r *OCI8Result) RowsAffected() (int64, error)
type OCI8Rows
    func (rc *OCI8Rows) Close() error
    func (rc *OCI8Rows) ColumnTypeDatabaseTypeName(i int) string
    func (rc *OCI8Rows) ColumnTypeLength(i int) (length int64, ok bool)
    func (rc *OCI8Rows) ColumnTypeNullable(i int) (nullable, ok bool)
    func (rc *OCI8Rows) ColumnTypeScanType(i int) reflect.Type
    func (rc *OCI8Rows) Columns() []string
    func (rc *OCI8Rows) Next(dest []driver.Value) (err error)
type OCI8Stmt
    func (s *OCI8Stmt) Close() error
    func (s *OCI8Stmt) Exec(args []driver.Value) (r driver.Result, err error)
    func (s *OCI8Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
    func (s *OCI8Stmt) NumInput() int
    func (s *OCI8Stmt) Query(args []driver.Value) (rows driver.Rows, err error)
    func (s *OCI8Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
type OCI8Tx
    func (tx *OCI8Tx) Commit() error
    func (tx *OCI8Tx) Rollback() error
type Values
    func ParseQuery(query string) (m Values, err error)
    func (v Values) Add(key, value string)
    func (v Values) Del(key string)
    func (v Values) Encode() string
    func (v Values) Get(key string) string
    func (v Values) Set(key, value string)

Package files

dsn.go oci8.go oci8_go18.go

func CByte

func CByte(b []byte) *C.char

func GetLastInsertId

func GetLastInsertId(id int64) string

func QueryEscape

func QueryEscape(s string) string

QueryEscape escapes the string so it can be safely placed inside a URL query.

func QueryUnescape

func QueryUnescape(s string) (string, error)

QueryUnescape does the inverse transformation of QueryEscape, converting %AB into the byte 0xAB and '+' into ' ' (space). It returns an error if any % is not followed by two hexadecimal digits.

type DSN

type DSN struct {
    Connect  string
    Username string
    Password string

    Location *time.Location
    // contains filtered or unexported fields
}

func ParseDSN

func ParseDSN(dsnString string) (dsn *DSN, err error)

ParseDSN parses a DSN used to connect to Oracle It expects to receive a string in the form: user:password@host:port/sid?param1=value1&param2=value2

Currently the parameters supported is: 1 'loc' which sets the timezone to read times in as and to marshal to when writing times to Oracle date, 2 'isolation' =READONLY,SERIALIZABLE,DEFAULT 3 'prefetch_rows' 4 'prefetch_memory' 5 'questionph' =YES,NO,TRUE,FALSE enable question-mark placeholders, default to false

type EscapeError

type EscapeError string

func (EscapeError) Error

func (e EscapeError) Error() string

type OCI8Conn

type OCI8Conn struct {
    // contains filtered or unexported fields
}

func (*OCI8Conn) Begin

func (c *OCI8Conn) Begin() (driver.Tx, error)

func (*OCI8Conn) BeginTx

func (c *OCI8Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)

BeginTx implement ConnBeginTx.

func (*OCI8Conn) Close

func (c *OCI8Conn) Close() error

func (*OCI8Conn) Exec

func (c *OCI8Conn) Exec(query string, args []driver.Value) (driver.Result, error)

func (*OCI8Conn) ExecContext

func (c *OCI8Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

ExecContext implement ExecerContext.

func (*OCI8Conn) Ping

func (c *OCI8Conn) Ping(ctx context.Context) error

Ping implement Pinger.

func (*OCI8Conn) Prepare

func (c *OCI8Conn) Prepare(query string) (driver.Stmt, error)

func (*OCI8Conn) PrepareContext

func (c *OCI8Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)

PrepareContext implement ConnPrepareContext.

func (*OCI8Conn) QueryContext

func (c *OCI8Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

QueryContext implement QueryerContext.

type OCI8Driver

type OCI8Driver struct {
}

func (*OCI8Driver) Open

func (d *OCI8Driver) Open(dsnString string) (connection driver.Conn, err error)

type OCI8Result

type OCI8Result struct {
    // contains filtered or unexported fields
}

func (*OCI8Result) LastInsertId

func (r *OCI8Result) LastInsertId() (int64, error)

func (*OCI8Result) RowsAffected

func (r *OCI8Result) RowsAffected() (int64, error)

type OCI8Rows

type OCI8Rows struct {
    // contains filtered or unexported fields
}

func (*OCI8Rows) Close

func (rc *OCI8Rows) Close() error

func (*OCI8Rows) ColumnTypeDatabaseTypeName

func (rc *OCI8Rows) ColumnTypeDatabaseTypeName(i int) string

ColumnTypeDatabaseTypeName implement RowsColumnTypeDatabaseTypeName.

func (*OCI8Rows) ColumnTypeLength

func (rc *OCI8Rows) ColumnTypeLength(i int) (length int64, ok bool)

func (*OCI8Rows) ColumnTypeNullable

func (rc *OCI8Rows) ColumnTypeNullable(i int) (nullable, ok bool)

ColumnTypeNullable implement RowsColumnTypeNullable.

func (*OCI8Rows) ColumnTypeScanType

func (rc *OCI8Rows) ColumnTypeScanType(i int) reflect.Type

ColumnTypeScanType implement RowsColumnTypeScanType.

func (*OCI8Rows) Columns

func (rc *OCI8Rows) Columns() []string

func (*OCI8Rows) Next

func (rc *OCI8Rows) Next(dest []driver.Value) (err error)

type OCI8Stmt

type OCI8Stmt struct {
    // contains filtered or unexported fields
}

func (*OCI8Stmt) Close

func (s *OCI8Stmt) Close() error

func (*OCI8Stmt) Exec

func (s *OCI8Stmt) Exec(args []driver.Value) (r driver.Result, err error)

func (*OCI8Stmt) ExecContext

func (s *OCI8Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)

ExecContext implement ExecerContext.

func (*OCI8Stmt) NumInput

func (s *OCI8Stmt) NumInput() int

func (*OCI8Stmt) Query

func (s *OCI8Stmt) Query(args []driver.Value) (rows driver.Rows, err error)

func (*OCI8Stmt) QueryContext

func (s *OCI8Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)

QueryContext implement QueryerContext.

type OCI8Tx

type OCI8Tx struct {
    // contains filtered or unexported fields
}

func (*OCI8Tx) Commit

func (tx *OCI8Tx) Commit() error

func (*OCI8Tx) Rollback

func (tx *OCI8Tx) Rollback() error

type Values

Values maps a string key to a list of values. It is typically used for query parameters and form values. Unlike in the http.Header map, the keys in a Values map are case-sensitive.

type Values map[string][]string

func ParseQuery

func ParseQuery(query string) (m Values, err error)

ParseQuery parses the URL-encoded query string and returns a map listing the values specified for each key. ParseQuery always returns a non-nil map containing all the valid query parameters found; err describes the first decoding error encountered, if any.

func (Values) Add

func (v Values) Add(key, value string)

Add adds the value to key. It appends to any existing values associated with key.

func (Values) Del

func (v Values) Del(key string)

Del deletes the values associated with key.

func (Values) Encode

func (v Values) Encode() string

Encode encodes the values into “URL encoded” form ("bar=baz&foo=quux") not sorted by key

func (Values) Get

func (v Values) Get(key string) string

Get gets the first value associated with the given key. If there are no values associated with the key, Get returns the empty string. To access multiple values, use the map directly.

func (Values) Set

func (v Values) Set(key, value string)

Set sets the key to value. It replaces any existing values.