An open API service indexing awesome lists of open source software.

https://github.com/cloudspannerecosystem/memefish

memefish is the foundation to analyze Spanner SQL
https://github.com/cloudspannerecosystem/memefish

golang parser spanner sql

Last synced: about 1 month ago
JSON representation

memefish is the foundation to analyze Spanner SQL

Awesome Lists containing this project

README

          



# méméfish

> méméfish is the [Spanner][] [SQL][Spanner SQL] parser for Go.

[Spanner]: https://cloud.google.com/spanner/
[Spanner SQL]: https://cloud.google.com/spanner/docs/query-syntax

[![GoDoc Reference][godoc-badge]](https://pkg.go.dev/github.com/cloudspannerecosystem/memefish)

## News

ℹ️

Since 2023/4/1, this repository has been moved from [MakeNowJust](https://github.com/makenowjust) to [cloudspannerecosystem](https://github.com/cloudspannerecosystem).
You may need to migrate import paths from `github.com/MakeNowJust/memefish` to `github.com/cloudspannerecosystem/memefish` like:

```diff
import (
- "github.com/MakeNowJust/memefish/pkg/parser"
+ "github.com/cloudspannerecosystem/memefish/pkg/parser"
)
```

ℹ️

Since 2023/4/12, the layout of this repository has been changed.
Now, the old `parser` package has been moved to the top of the repository as the new `memefish` package, and sub-packages in the `pkg` directory are placed under the top.
You may need to migrate import paths like:

```diff
import (
- "github.com/cloudspannerecosystem/memefish/pkg/token"
- "github.com/cloudspannerecosystem/memefish/pkg/parser"
+ parser "github.com/cloudspannerecosystem/memefish"
+ "github.com/cloudspannerecosystem/memefish/token"
)
```

In addition, we removed the `analyzer` package from the repository.
Thus, if you want to use the old `analyzer` package, please pin the dependency by the commit hash before this change.

## Features

- Parse Spanner SQL to AST
- Generate Spanner SQL from AST (unparse)

## Notice

This project is originally developed under "Expert team Go Engineer (Backend)" of [Mercari Summer Internship for Engineer 2019](https://mercan.mercari.com/articles/13497/).

## License

This project is licensed under MIT license.

[godoc-badge]: https://img.shields.io/badge/godoc-reference-black.svg?style=for-the-badge&colorA=%235272B4&logo=go&logoColor=white