Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SQLite3 #38

Open
MeiKatz opened this issue Oct 31, 2021 · 4 comments
Open

Support SQLite3 #38

MeiKatz opened this issue Oct 31, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@MeiKatz
Copy link

MeiKatz commented Oct 31, 2021

Hej,

are there any plans to support SQLite3 as database driver? I am developing my apps with SQLite3 on my machine and with MySQL on the production server. So far I cannot use this package as much as I would like to. And I don't think that I would be this hard:

  • use LENGTH() instead of CHAR_LENGTH()
  • escape column names because SQLite3 does not support a number as the first character of a column name

If you would like I could create a pull request. I only need one hint: where are the columns like 0_post_key are defined? Couldn't find it for now.

@MeiKatz
Copy link
Author

MeiKatz commented Oct 31, 2021

Okay, I tried successfully to adjust it for SQLite3 and it was quite easy:

  • I prefixed the column names with a single character: 0_post_key got a0_post_key
  • => get the grammar and wrap the column name ($builder->getGrammar()->wrap( $column ))
  • I added a single NULL in the COALESCE() function because SQLite3 expects at least two arguments
  • use LENGTH() instead of CHAR_LENGTH()

... and that is nearly all. I discovered an issue for modules that don't have timestamp column (EDIT: created an issue for this #39). Will further invest into this tomorrow.

@pascalbaljet pascalbaljet added the enhancement New feature or request label Dec 12, 2022
@juliangarcess
Copy link

Any updates?

@MeiKatz
Copy link
Author

MeiKatz commented Oct 16, 2024

Any updates?

I will have a look at this in the next time. Haven't used this package for some time.

@juliangarcess
Copy link

Hi! @MeiKatz did you check it?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants