use com.basiscomponents.db.ResultSet
use com.basiscomponents.bc.SqlQueryBC
declare SqlQueryBC sbc!
declare ResultSet rs!
sbc! = new SqlQueryBC(BBjAPI().getJDBCConnection("CDStore"))
rs! = sbc!.retrieve("SELECT TOP 1 ARTIST as artist, TITLE as title FROM CDINVENTORY")
clipfromstr 1,rs!.toJson()
Take a look at the ColumnLabel in meta, it is ARTIST instead of artist and TITLE instead of title. For the
BBjGridExWidget this means extra work for the developer to fix the column labels so the text transformation is respected.
Can we do something about this?
[
{
"ARTIST": "John Hurt \u0026 The Ramblers",
"TITLE": "Mississippi Blues",
"meta": {
"ARTIST": {
"ReadOnly": "false",
"ColumnType": "12",
"Signed": "false",
"AutoIncrement": "false",
"Writable": "true",
"ColumnLabel": "ARTIST",
"Scale": "0",
"StringFormat": "",
"TableName": null,
"ColumnClassName": "java.lang.String",
"ColumnDisplaySize": "50",
"Precision": "50",
"Currency": "false",
"CaseSensitive": "true",
"CatalogName": null,
"Searchable": "true",
"DefinitelyWritable": "false",
"SchemaName": null,
"Nullable": "2",
"EDITABLE": "0"
},
"TITLE": {
"ReadOnly": "false",
"ColumnType": "12",
"Signed": "false",
"AutoIncrement": "false",
"Writable": "true",
"ColumnLabel": "TITLE",
"Scale": "0",
"StringFormat": "",
"TableName": null,
"ColumnClassName": "java.lang.String",
"ColumnDisplaySize": "50",
"Precision": "50",
"Currency": "false",
"CaseSensitive": "true",
"CatalogName": null,
"Searchable": "true",
"DefinitelyWritable": "false",
"SchemaName": null,
"Nullable": "2",
"EDITABLE": "0"
}
}
}
]