Skip to content

Commit

Permalink
Revert erroneously merged code in database.gd
Browse files Browse the repository at this point in the history
  • Loading branch information
2shady4u committed Apr 4, 2021
1 parent 4f8e758 commit ed34475
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions demo/database.gd
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,5 @@ func example_of_fts5_usage():
db.query("SELECT * FROM " + table_name + " WHERE posts MATCH 'learn SQLite';")
cprint("result: {0}".format([String(db.query_result)]))

# Export the table to a json-file and automatically encode BLOB data to base64.
db.export_to_json(json_name + "_base64_new")

# Import again!
db.import_from_json(json_name + "_base64_old")

# Check out the 'old' icon stored in this backup file!
selected_array = db.select_rows(table_name, "", ["data"])
for selected_row in selected_array:
var selected_data = selected_row.get("data", PoolByteArray())

var image := Image.new()
var _error : int = image.load_png_from_buffer(selected_data)
var loaded_texture := ImageTexture.new()
loaded_texture.create_from_image(image)
emit_signal("texture_received", loaded_texture)

# Close the current database
db.close_db()

0 comments on commit ed34475

Please sign in to comment.