Skip to content

v0.3.0

Latest

Choose a tag to compare

@kenshaw kenshaw released this 04 Nov 05:05
· 1 commit to main since this release

A RAW reports its length, and a decimal of another package binds and scans.

go get github.com/xo/oracle@v0.3.0

New

  • sql.ColumnType.Length() gives the declared length of a RAW in bytes,
    so SYS_GUID() and a RAW(16) column give 16. A caller can tell a
    RAW(16), which holds a GUID, from another RAW. A VARCHAR2,
    NVARCHAR2, CHAR and NCHAR give their length in characters. A
    LONG, LONG RAW, CLOB, NCLOB, BLOB and BFILE give
    math.MaxInt64, as database/sql asks for a type with no limit.
    NUMBER, DATE and the other types of fixed length give none. v0.2.0
    gave a length for the string types only.
  • A decimal of another package binds as a NUMBER, and scans from one with
    every digit, when it has the Decompose and Compose methods that
    database/sql uses to pass a decimal as its parts. This holds for an
    argument, an attribute of an object, and an OUT or IN OUT of PL/SQL. A
    nil one binds as a NULL. v0.2.0 failed to bind such a decimal with "no
    parameter coder registered", and failed to scan into one.

The API of v0.2.0 is unchanged.