SQLite query only returns 1 record from 20 [SOLVED]

SQLite tutorials for openFL are almost nonexistent and I have an issue running a simple query. I am trying to return all records from a table but it only seems to be returning the 1st record out of 20:

model  = new Model();

		var q = "SELECT * FROM setting` ORDER BY id ASC";
		var settings = model.dbQuery(q);
		
		for(i in settings){
			trace(i);
		} 

When I trace out the input I only get the first record in the table. I am coming from a PHP MySQL background. Any pointers are greatly appreciated!

Found the answer for anyone who may run into this:

public function dbQuery(str){
		
		var db_conn = sys.db.Sqlite.open(Assets.getPath(assetPath));
		var result = db_conn.request(str);
		trace(result.results());// to get all record I had to add results() to my result variable. Otherwise it only returns 1 record
		
		db_conn.close();
		return result;
	}
2 Likes