I'm sure this is not a problem on your side, I just noticed loading the file up in sqllitestudio (3.2.1) didn't let me querry it anymore. On the other hand editing, the item.db in the examples works fine with adding lines or editing values. So i guess the problem lies in the design of my database..
I post this still as an issue as I really have no clue where else to asked that question.
At the time i tried almost everything: lowercase names, uppercase names, removing datetime as this could be something the addon doesn't support, only have tables with full values etc.
my code is this one:
func _ready():
# Create gdsqlite instance
var db = SQLite.new();
# Open item database
db.open_db("res://database.db")
# db.open_db("res://items.db")
# Get item list from db
var player = db.fetch_array("SELECT * FROM player ORDER BY id ASC");
# var player = db.fetch_array("SELECT * FROM potion ORDER BY id ASC");
for m in player:
print(m['id']);
print(db.close())
as you can see i commented it out so that i can use it with the example database. I even addet a new table to items.db and it still works fine with it, but database.db doesn't. SQLLiteStudio marks both as (SQLLite3) behind the database name.
Edit:
Also tried to use the same querry on SQLLiteStudio and Commandline where it worked just fine, further adding to my confusion :/
tried adding a foreign key referencing the potions table, worked just fine. So that's it neither.
copied my table to items.db and that broke it too, so it must be something in my table. Also removed every 'Unique' and 'NotNull' leaving only the two primary keys (1 in each of the two tables) and a foreignKey. Still, as mentioned above: "SELECT * FROM player ORDER BY id ASC" works in the Studio and i even tried "PRAGMA integrity_check;"... but I don't know what it checks tbh. 😕
copied the potion table from items.db to my database and it also didn't work. So narrowing it down to something in the database, not the table (?)... do i need some special version here? But then why does it also doesn't accept the tables when i copy them to the other database? Does that tamper somehow with the structure of the database itself?
I'm sure this is not a problem on your side, I just noticed loading the file up in sqllitestudio (3.2.1) didn't let me querry it anymore. On the other hand editing, the item.db in the examples works fine with adding lines or editing values. So i guess the problem lies in the design of my database..
I post this still as an issue as I really have no clue where else to asked that question. At the time i tried almost everything: lowercase names, uppercase names, removing datetime as this could be something the addon doesn't support, only have tables with full values etc.
my code is this one:
as you can see i commented it out so that i can use it with the example database. I even addet a new table to items.db and it still works fine with it, but database.db doesn't. SQLLiteStudio marks both as (SQLLite3) behind the database name.
Edit:
Also tried to use the same querry on SQLLiteStudio and Commandline where it worked just fine, further adding to my confusion :/
tried adding a foreign key referencing the potions table, worked just fine. So that's it neither.
copied my table to items.db and that broke it too, so it must be something in my table. Also removed every 'Unique' and 'NotNull' leaving only the two primary keys (1 in each of the two tables) and a foreignKey. Still, as mentioned above: "SELECT * FROM player ORDER BY id ASC" works in the Studio and i even tried "PRAGMA integrity_check;"... but I don't know what it checks tbh. 😕
copied the potion table from items.db to my database and it also didn't work. So narrowing it down to something in the database, not the table (?)... do i need some special version here? But then why does it also doesn't accept the tables when i copy them to the other database? Does that tamper somehow with the structure of the database itself?