Skip to content

dmystk/haskell-pseudo-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haskell Pseudo SQL

Haskell Pseudo SQL (HPSQL) is SQL parser written by Haskell.

This is a hobby, so the function is limited. Currently it supports only DDL.

How to use

Building and executing are followed the way of stack.

$ stack build
$ stack exec hpsql-exe

When type that, HPSQL runs as repl. You can enter SQL on that. Type :q for quit.

HPSQL doesn't execute the SQL itself, but instead converts it to the command for fictional database. For example, like follow:

hpsql> CREATE DATABASE foo;
[ 
    ( [ CreateDatabase "foo" ]
    , []
    ) 
]

hpsql> create table foo (id integer primary key, name char(255) not null);
[ 
    ( 
        [ CreateTable "foo" 
            [ 
                ( "id" 
                , TypeInteger
                , [ PrimaryKey ]
                ) 
            , 
                ( "name" 
                , TypeChar 255
                , [ NotNull ]
                ) 
            ] 
        ]
    , []
    ) 
]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published