flow icon indicating copy to clipboard operation
flow copied to clipboard

Do you have plans to provide a version that supports sqlite databases?

Open 3xxx opened this issue 6 years ago • 6 comments

Do you have plans to provide a version that supports sqlite databases? I tried to change your code to support sqlite. The original SQL language is a bit different for mysql and sqlite. If you are considering using a golang orm library like xorm, the flow may have extensive database support.

3xxx avatar Feb 23 '19 10:02 3xxx

@3xxx

Following your question, I have investigated xorm, gorm, sqlboiler and a few others. I am not in favour of using an ORM. I think that they are too heavy for a tiny library such as flow.

Nonetheless, can you please give me a few examples of the changes that you had to make to the SQL statements, to make them work with SQLite? That may give me some hints. Thanks!

js-ojus avatar Feb 25 '19 09:02 js-ojus

snap2 snap3

3xxx avatar Feb 27 '19 12:02 3xxx

Thank you @3xxx !

I have never used SQLite myself. Reading through its documentation, I have realised that SQLite is severely limited in the datatypes it supports. In fact, it is dynamically typed, with actual type determined based on a column type "affinity"!

I can understand the effort that you must be putting into making all DDL and DML statements work with SQLite.

I shall keep this issue open, so that I can give this another thought -- at a more relaxed time!

js-ojus avatar Feb 27 '19 12:02 js-ojus

@3xxx

Would it be very difficult for you to use MySQL itself? I ask this since I do not know your deployment constraints.

js-ojus avatar Feb 27 '19 12:02 js-ojus

Thank you for your answer. There is actually no difficulty in using MySQL. I use SQLite primarily for convenience, because it is embedded and does not require a separate database service to run, so using SQLite makes the developed application easy to deploy. One of the great advantages of the Golang is its ease of deployment.This is not an urgent need. I can work it out.

3xxx avatar Feb 28 '19 13:02 3xxx

Noted, @3xxx !

As I said, I shall leave this issue open.

js-ojus avatar Feb 28 '19 15:02 js-ojus