alash3al/sqler

sqlite3 is not supported ?

restagner opened this issue · 7 comments

It does not appear that sqlite3 is supported under Linux. I downloaded the latest vesion (2.0) onto my Linux workstation and attempted to run the following

$ sqler -driver sqlite3 -dsn /home/restagner/sqlite/roberts.db -config /home/restagner/SQLer/config.hcl 
[sqlite3] /home/restagner/sqlite/roberts.db - connection error - (Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub)

Am I missing something obvious, here?

It is supported, but seems it is a compile bug, anyway, I'll recompile it on a linux machine, as well as there will be a docker image.

That would be great, @alash3al. I look forward to the recompiled release!!

Could you re-download the Linux release again?

Sure. I'll download that later tonight and let you know. This is the release you are referring to, correct?

https://github.com/alash3al/sqler/releases/download/v2.0/sqler_linux_amd64.zip

just want to make sure, @alash3al

yes, that is right, hope it will work as expected

@alash3al Success!!! THANKS.

Results from my test

$ sqler -driver sqlite3 -dsn /home/restagner/sqlite/chinook.db -config /home/restagner/SQLer/config.hcl 


                         ____   ___  _              
                        / ___| / _ \| |    ___ _ __ 
                        \___ \| | | | |   / _ \ '__|
                         ___) | |_| | |__|  __/ |   
                        |____/ \__\_\_____\___|_|   

        turn your SQL queries into safe valid RESTful apis.


⇨ sqler server version: v1.0 
⇨ sqler used driver is sqlite3 
⇨ sqler used dsn is /home/restagner/sqlite/chinook.db 
⇨ sqler workers count: 4 
⇨ sqler resp server available at: :3678 
⇨ sqler rest server available at: :8025

.
.
.

And, sample response from REST call

{
  "data": [
    {
      "ArtistId": 1,
      "Name": "AC/DC"
    },
    {
      "ArtistId": 2,
      "Name": "Accept"
    },
    {
      "ArtistId": 3,
      "Name": "Aerosmith"
    },
    {
      "ArtistId": 4,
      "Name": "Alanis Morissette"
    },
    {
      "ArtistId": 5,
      "Name": "Alice In Chains"
    },
    {
      "ArtistId": 6,
      "Name": "Antônio Carlos Jobim"
    }

NOTE: ⇨ sqler server version: v1.0 probably should read ⇨ sqler server version: v2.0

Thanks for your notice, I forgot to update the version number