 		}
 		
 		public function handleRow(rowData:Array):void {
+			assert("Received data before metadata", _data);
 			if (rowData.length != _columns.length) {
 				LOGGER.error("Unexpected row data: got {0} fields, expected {1}; skipping", rowData.length, _columns.length);
 				return; 

package org.postgresql.db {
	import org.postgresql.log.ILogger;
	import org.postgresql.log.Log;
	

	public class SimpleResultHandler implements IResultHandler {

			var row:Object = {};
			// Re-map values based on column names. This is problematic when multiple
			// columns with the same name are present, but that rarely happens in
			// practice so this is a reasonable default implementation.
			for (var i:int = 0; i < rowData.length; i++) {
				var col:IColumn = _columns[i];
				var data:Object = rowData[i];
				row[col.name] = data;
			}
			_data.push(row);
		}
		
		public function handleCompletion(command:String, rows:int, oid:int):void {
