With Travis’ help I was able to come up with a solution. Basically I run a query, create a new PyDataSet, populate the new PyDataSet with the query results while casting the rows that need to be boolean with java.lang.boolean. I did run into an issue with color, I’m not sure how I’m going to store color in the database so for the time being I’m just adding an arbitrary color to the dataset.
[code]def getColumnAttributesData(ID):
import fpmi
from java.lang import Boolean
from java.awt import Color
results = fpmi.db.runQuery("SELECT name, label, hidden, width, horizontalAlignment, verticalAlignment, \
numberFormat, dateFormat, treatAsBoolean, translateMap, imageMap, prefix, \
suffix, treatAsProgressBar, progressRange, progressBackground, progressForeground, \
hideTextOverProgressbar, bgcolorMap, fgcolorMap, editable \
FROM dataview_attributes WHERE dataview_id = %i" % ID)
formattedHeader = ['name', 'label', 'hidden', 'width', 'horizontalAlignment', 'verticalAlignment',
'numberFormat', 'dateFormat', 'treatAsBoolean', 'translateMap', 'imageMap', 'prefix',
'suffix', 'treatAsProgressBar', 'progressRange', 'progressBackground', 'progressForeground',
'hideTextOverProgressbar', 'bgcolorMap', 'fgcolorMap', 'editable']
formattedResults = []
for row in results:
formattedResults.append([row[0], row[1], Boolean(row[2]), row[3], row[4], row[5],
row[6], row[7], Boolean(row[8]), row[9], row[10], row[11],
row[12], Boolean(row[13]), row[14], Color(255,255,255), Color(255,255,255),
Boolean(row[17]), row[18], row[19], Boolean(row[20])])
return fpmi.db.toDataSet(formattedHeader, formattedResults)[/code]