Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.5% dependent packages on proxy.golang.org
Top 4.8% dependent repos on proxy.golang.org

proxy.golang.org : github.com/mitranim/sqlp

Parser and formatter for rewriting foreign code embedded in SQL queries, such as parameter placeholders: `$1` or `:ident`, or code encased in delimiters: `()` `[]` `{}`. It supports the following SQL features: • ” : single quotes. • "" : double quotes. • “ : grave quotes (non-standard). • -- : line comments. • /* : block comments. • :: : Postgres-style cast operator (non-standard). In addition, it supports the following: • () : content in parens. • [] : content in brackets. • {} : content in braces. • $1 $2 ... : ordinal parameter placeholders. • :identifier : named parameter placeholders. Supporting SQL quotes and comments allows us to correctly ignore text inside special delimiters that happens to be part of a string, quoted identifier, or comment. This library supports incremental parsing token by token, via `Tokenizer`. It also lets you convert a sequence of tokens into a fully-built AST via `Parser`. Choose the approach that better suits your use case. Oversimplified example: The AST now looks like this:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/mitranim/sqlp
Keywords: go, parser, sql
License: Unlicense
Latest release: about 1 year ago
First release: over 3 years ago
Namespace: github.com/mitranim
Dependent packages: 1
Dependent repositories: 1
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 26 days ago

    Loading...
    Readme
    Loading...