-
-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the solution you'd like
Since gdscript doesn't support pointers or passing by reference, it would be more efficient and possibly safer to have query() return the actual recordset instead of a boolean. In the current implementation, the caller has to duplicate the recordset into an empty dictionary in order to preserve it or it gets deleted on the next query().
Current:
var my_result = {}
if db.query(sql_string):
my_result = db.query_result.duplicate() # adds more overhead if query_result is complex
New:
var my_result = {}
my_result = db.query(sql_string)
if my_result.empty():
# error handling
else
# do stuff with my_result without having to duplicate it or worry it will be overwritten by another query()
2shady4u
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request