> columnNames := Dictionary new.
> callback := [ :length :fieldValues :fieldNames |
> "length is SmallInteger"
> "values and fields are LPVOID"
> (columnNames size = 0) ifTrue: [
> 1 to: length do: [ :ea |
> columnNames at: (String fromAddress: (fieldNames at: ea)) put:
> ea.
> ].
> ].
> ].
columnNames := Dictionary new.
callback := [ :columns :values :names |
| namesArray valuesArray |
valuesArray := PointerArray fromAddress: values bytes length: columns
elementClass: String.
namesArray := PointerArray fromAddress: names bytes length: columns
elementClass: String.
(columnNames size = 0) ifTrue: [
1 to: columns do: [ :ea |
columnNames at: (namesArray at: ea) put: ea.
].
].
].
Holy shit that works! but it seems like a lot of bloody code. Is there
something more compact than having to create new temporary arrays?