5 Commits

Author SHA1 Message Date
Maxim Ivanov
a6747b513f Split composite examples 2020-04-13 17:44:02 +01:00
Maxim Ivanov
3ce29f9e05 Add Composite type for inplace row() values handling
Composite() function returns a private type, which should
be registered with ConnInfo.RegisterDataType for the composite
type's OID.

All subsequent interaction with Composite types is to be done
via Row(...) function. Function return value can be either
passed as a query argument to build SQL composite value out of
individual fields or passed to Scan to read SQL composite value
back.

When passed to Scan, Row() should have first argument of type
*bool to flag NULL values returned from query.
2020-04-13 17:41:44 +01:00
Maxim Ivanov
8ae83b19f7 Add EncodeRow helpers
Also extend example to show how EncodeRow can be used
to create binary encoders for composite type
2020-04-13 00:09:03 +01:00
Maxim Ivanov
368295d3ee Create ROW helper for adhoc decoding of records 2020-04-12 18:40:52 +01:00
Maxim Ivanov
71ed747f3a Add example of CompositeType handling with ScanRowValue helper 2020-04-12 17:36:39 +01:00