Results and types

Results

execute returns a Result:

MemberContents
result.columnsone ColumnInfo per column: name, declared type, nullability, precision, scale, and the length of a text or binary column
result.valuesevery cell, aligned with columns
result.updatecountrows affected by DML, or -1 for a query
result.countersthe raw number of rows … counters behind updatecount
rows(result)each row as a dictionary keyed by column name, built on first use
scalar(result)the first cell of the first row
rowcount(result)rows returned, or rows affected by DML
isupdate(result)whether the result came from DML
columnnames(result)the column names, in order

A Result iterates and indexes over its rows:

for row in result
    println(row[1], " ", row[2])
end

result[1]           # the first row
result[1, 2]        # one cell of it
result[1, "NAME"]   # the same, by column name (case-insensitive)
map(row -> row[1], result)

rows cannot hold two columns with the same name (a self-join reports ID twice, and the later one wins); values keeps both.

Types

SQL typeJulia type
integral NUMBER, INTEGER and similarInt64, or BigInt beyond 64 bits
fractional NUMBER, FLOAT, DOUBLE, REALFloat64
VARCHAR and other text typesString
BOOLEANBool
BINARYVector{UInt8}
DATEDate
TIMETime
TIMESTAMP, TIMESTAMP_NTZ, DATETIMEDateTime
TIMESTAMP_LTZ, TIMESTAMP_TZZonedTimestamp
VARIANT, OBJECT, ARRAYString, as the engine renders it
SQL NULLnothing

A NUMBER(38,0) can exceed Int64. The driver's JSON parser keeps each number's text, so such a value arrives as an exact BigInt rather than a rounded Float64.

Julia's standard library has no zoned timestamp type, so TIMESTAMP_TZ and TIMESTAMP_LTZ become a ZonedTimestamp: the wall clock (z.datetime) and its UTC offset (z.offset). Compare two of them with utc(z), which returns the instant.

Date and DateTime values are read exactly as stored, without conversion to the host's time zone.