parsegres

Version, currently main branch1 version
  • main branchlatestJul 26, 2026

github.com/jgaskins/parsegres

PostgreSQL-compatible SQL parser library written in pure Crystal

1 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  parsegres:
    github: jgaskins/parsegres
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
>= 1.19.1
License
MIT
Author
Jamie Gaskins

Dependencies

This version declares no dependencies.

README

Parsegres

Parsegres provides a Postgres-compatible SQL parser.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      parsegres:
        github: jgaskins/parsegres
  2. Run shards install

Usage

The main use case is to parse a SQL query using the Parsegres.parse method:

require "parsegres"

query = Parsegres.parse(<<-SQL)
  SELECT *
  FROM users
  WHERE status = $1
  AND group_id = $2
  LIMIT 25
SQL

Contributing

  1. Fork it (https://github.com/jgaskins/parsegres/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors