2shady4u / godot-sqlite

GDExtension wrapper for SQLite (Godot 4.x+)
MIT License
975 stars 83 forks source link

select_rows method too limited... #145

Closed jospic closed 1 year ago

jospic commented 1 year ago

Hi, select_rows( String table_name, String query_conditions, Array selected_columns ) function is so poor comparing it to the old fetch_array available in the old Godot extension.

There is no possibility to group or sort the result. For sorting it is not bad as it can be done after, but it is not possible, for example, to insert instructions such as "GROUP BY" or it is not possible to using several tables, but only one, to extract complex data with a single query.

How is it possible to do such a thing (old fetch_array) with the new instructions?

var query ="SELECT users.ID, users.Nome, subscriptions.Descrizione, payments.PayDate, payments.ExpDate FROM payments, users, subscriptions WHERE payments.UserID = users.ID AND subscriptions.ID = payments.AbbID GROUP BY users.ID ORDER BY users.ID ASC" d = db.fetch_array(query)

Is there anyway? Thanks in advance. -j