Giter VIP home page Giter VIP logo

Comments (11)

willy610 avatar willy610 commented on May 16, 2024 3

hej folks.
Just made some kind of console application built on gluesql = {version="0.3"} or later of cource. Not on the project source. ok.

It's not present at GitHub yet. Trademarks, maintain, could be separate repository as a sister to gluesql.
It's called abc_sql at the moment to avoid any interferences with gluesql

It has the following poor help

here > ./target/debug/abc_sql --help
OK 
abc-sql   --newdb filename
        | --insql file --olddb filename [--printsqlstm]
        | --incsv file --olddb filename --table tablename 
            [ --append ]
            #NOT_YET ( 
              (--headers "col1,col2" [ --ignorefirtslineheaders ] )
              | --headersfirstlineincsv 
            ) 
            #NOT_YET [--colsep ','] [ --linsep ' ']
        | --olddb filename #interactive usage !
        | --outcsv filename --olddb filename --table tablename
        | --outsql filename --olddb filename --table tablename
            [--droptable] [--createtable] 
here > 

Create db, import of sql scripts, export of sql, csv import/export and interactive support

Interactive

abc-sql  > select * from S                                
         > left join P on S.CITY = P.CITY;
"select * from S left join P on S.CITY = P.CITY ;"


+-----+-------+--------+--------+------+-------+-------+--------+--------+
| SNO | SNAME | STATUS |  CITY  | PNO  | PNAME | COLOR | WEIGHT |  CITY  |
+-----+-------+--------+--------+------+-------+-------+--------+--------+
| S1  | Smith |     20 | London | P1   | Nut   | Red   |     12 | London |
| S1  | Smith |     20 | London | P4   | Screw | Red   |     14 | London |
| S1  | Smith |     20 | London | P6   | Cog   | Red   |     19 | London |
| S2  | Jones |     10 | Paris  | P2   | Bolt  | Green |     17 | Paris  |
| S2  | Jones |     10 | Paris  | P5   | Cam   | Blue  |     12 | Paris  |
| S3  | Blake |     30 | Paris  | P2   | Bolt  | Green |     17 | Paris  |
| S3  | Blake |     30 | Paris  | P5   | Cam   | Blue  |     12 | Paris  |
| S4  | Clark |     20 | London | P1   | Nut   | Red   |     12 | London |
| S4  | Clark |     20 | London | P4   | Screw | Red   |     14 | London |
| S4  | Clark |     20 | London | P6   | Cog   | Red   |     19 | London |
| S5  | Adams |     20 | Athens | null | null  | null  | null   | null   |
+-----+-------+--------+--------+------+-------+-------+--------+--------+

abc-sql  > 

It hink it would be very useful for integration tests and it's powerful because you don't need to rebuild a project.
Just edit your scripts or try out via interactive playing.

Really amusing!

If it sounds interesting I can attach a project zip-file into this issue or elsewhere

from gluesql.

willy610 avatar willy610 commented on May 16, 2024 3

Just published https://github.com/willy610/abcsql.git

With a tryout on ORDER BY #78

from gluesql.

panarch avatar panarch commented on May 16, 2024 2

I have a plan but I may use a separate repository, but it might take some time to work on cli task.
For now, you can expect same SQL support between Rust crate and web version.
Though they use different storages, they all pass same integration test cases so you can think as same at least about functionality.

from gluesql.

willy610 avatar willy610 commented on May 16, 2024 1

Thanks @MichaelMcDonnell

Within a week or two I will put on GitHub repository under an open source license.
I hope it won't interfere with this GlueSql in any way. Trademarks or what ever

from gluesql.

MichaelMcDonnell avatar MichaelMcDonnell commented on May 16, 2024 1

I just learned about the rustyline crate. I think basing a CLI implementation around that would work out great. It has a lot of features including history, line editing and completion.

UPDATE: I learned about from the "What would SQLite look like if written in Rust?" article.

from gluesql.

willy610 avatar willy610 commented on May 16, 2024

Attached is a project on a simple command line tool.

abc-sql.zip

from gluesql.

MichaelMcDonnell avatar MichaelMcDonnell commented on May 16, 2024

That's looks nice @willy610! Are you planning to publish it on a GitHub repository under an open source license?

from gluesql.

MichaelMcDonnell avatar MichaelMcDonnell commented on May 16, 2024

Sounds good @willy610! The name abc_sql makes it clear that it is something separate.

from gluesql.

panarch avatar panarch commented on May 16, 2024

@willy610 You can feel comfortable to do what you want, that will not make any issue.
GlueSQL project is under Apache-2.0 license which is very generous, you can do almost whatever under this license.

from gluesql.

panarch avatar panarch commented on May 16, 2024

@willy610 Thanks for sharing, wow.. looks so great!

from gluesql.

panarch avatar panarch commented on May 16, 2024

@MichaelMcDonnell Thanks, looks good to use.

I'll also leave another crate structopt, this would be useful for command line argument parsing.

from gluesql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.