Download

Chimera Sqlite Database Blueprint/C++ Plugin

So Currently, in my own project I had the need for a high(er) level interface to a local SQL Lite database, beyond the basic implementation that will be offered in 4.6.

My goals were to include:

An easy way to query a local database through Blueprints.
A code first approach. You create classes that inherit from ChimeraSqlEntity, and a database is created automatically.

The result is an easy way to query a Sql Lite database from within blueprints (and from C++):

61ea2785872661ce7bb4bb1ed5441eb75dd50d81.png

I’m considering on releasing the code for this plugin after 4.6 release if people are interested in using it. The plugin is capable of the following features atm:

  1. Creating a Database through the Editor automatically using classes that Inherit from ChimeraSqlEntity. It currently supports basic Property types “FString, int, floats ect”. It will skip over non supported ones.
  2. In the event you rename, or add properties, you can reimport your database, it will migrate over the data automatically to the new tables created as a result. (Database is backed up automatically in the case of any issues)
  3. Using MetaData on properties you can specify indexes to be created.
  4. Using C++ or Blueprints you can Query for a Specified Entity using Where, Order By, Take, functions, and execute the Query with Count, ToArray, or First functions.

What it will NOT do:

  1. Currently, there is no support for inserting data, my intent when originally creating this plugin was it for it to be source of static data that would be shipped with the game. However, I may add support for inserting in the near future as it wouldn’t be very difficult.
  2. There is absolutely NO Security in this Plugin. This plugin was designed to be used against a local database, with insensitive information. As such I have done nothing to protect the code from SQL injection, though I do plan on improving this aspect at least some (you know in case of Bobby Drop Tables!).
  3. Relationships are not loaded in automatically but this is on my plate to make happen. So instead of two queries to get a relationship off a table, you could do it in one.

If anyone is interested in this plugin, please let me know, and I will put it up after 4.6 on github (it relies on the SQLiteDatabaseSupport module)

Good work.
I am interested in.

Thanks Dreamhole!

Hi Awdogs - I’m very interested in this. I tried to get the JSON plugin to work but I was too dense to set it up. I’m working using a system where data is piped in over a socket connection through a python app running externally (the python app pulls data out of an excel doc, formats it, sends a concatenated, delimited string to to UE which unpacks it and sends the data to variables). This is obviously a bit long winded. I’d be dead interested in getting data straight from a database.

Let me know!

Dan.

Great work Awdogsgo2heaven.

I am really interested in this plugin. Can you please give us github link.