SQLiteQueryResult has no column names

I’m using the alpha version (8.3.94.2017) and when building iOS everything works fine except:

Sugar.Data.SQLiteQueryResult
The Result doesn’t have column names, it returns an empty string for each column.

var result: Sugar.Data.SQLiteQueryResult! = StorageUtils.readAll(connection: self.connection!, tableName: tableName, whereClause: whereClause)
while result != nil && result.MoveNext() {
    // The key value pairs to add the columnName + value to		   
	var keyValuePairs = Sugar.Collections.Dictionary()
	for index in 0...(result.ColumnCount - 1){
		let columnName = result.ColumnName[index as! Int]
		let value = result.GetString(result.ColumnIndex[columnName])
				
		NSLog("key: \(columnName) with value: \(value) for index \(index)")
        }
}

I need these keyvalue pairs this way to parse it to the right model

Is this related to the iOS Simulator or related to the beta?

Thanks in advance!

Thanks, logged as bugs://75754

1 Like

I’ve made a sample project containing only a test insert and test select call to make debugging for you guys more easy.

I’ve attached it here:
LocalStorageTest.zip (4.0 MB)

Hope this helps u guys solve the issue ASAP.

Thanks in advance!

Hello. Thanks for the testcase!

1 Like

bugs://75754 got closed with status fixed.

1 Like

So will this fix be in the beta release of tomorrow?

Yes, but also on http://github.com/remobjects/sugar (develop branch)

Logged as bugs://i63712.

bugs://i63712 was closed as fixed.