Jump to content
Ketarin forum

Synchronize SQLite jobs database with XML


Mat
 Share

Recommended Posts

Currently the jobs database is stored using SQLite (jobs.db). This a good design choice considering performance and storage efficiently but it also makes it impossible to apply incremental updates using a text diff to the database. This is especially important if the database is maintained by several people, e.g. in a git repository.

 

I'm proposing the following feature:

- Use a xml file (e.g. jobs) as the primary storage and use SQLite (jobs.db) as an intermediary database (cache)

- When the application is started, check whether the cache is up-to-date. If lastmodifieddate(jobs.xml) > lastmodifieddate(jobs.db), drop the jobs.db and reimport the jobs.xml

- Internally work with the SQLLite database as of now

- When the application is closed, export all jobs from the the cache into the jobs.xml. Touch both files (jobs.xml, jobs.db) so that they have the same lastmodifieddate.

 

Maybe this could be implemented as an application setting:

[x] Synchronize jobs database with jobs.xml

 

This feature would allow several parties to collaborate on the database. Thank you.

 

As a temporary workaround, would it be possible to add a new command line argument import:

/import=FILENAME Starts Ketarin and imports the specified jobs xml file.
Link to comment
Share on other sites

I'll add an "/import" and "/clear" parameter for the next version, hope this helps (surprised this isn't actually done yet).

 

However, changing how the SQLite-DB is used will probably cause more trouble than it's worth it (and I don't have time for such changes anyway), so don't hope for any changes there at the moment.

Link to comment
Share on other sites

  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.