And no way to quickly insert multiple records quickly, the only way is to loop through an array of fields and run an individual aql::insert, which also does a select to return the inserted row.
This would figure out the minimum number of insert queries for field-data pairs given and insert them in a transaction. If all of the fields are the same, then this would be minimized to one query which would be much faster than the current alternative.
If aql::insert() contains a multi-dimensional array, multi_insert() would be used instead.
Note: this would not return an array of rows inserted.
Right now, we have this insert structure:
And no way to quickly insert multiple records quickly, the only way is to loop through an array of fields and run an individual
aql::insert
, which also does a select to return the inserted row.Proposal
This would figure out the minimum number of insert queries for field-data pairs given and insert them in a transaction. If all of the fields are the same, then this would be minimized to one query which would be much faster than the current alternative.
If
aql::insert()
contains a multi-dimensional array,multi_insert()
would be used instead.Note: this would not return an array of rows inserted.