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
- Host: GitHub
- URL: https://github.com/cloudspannerecosystem/memefish
- Owner: cloudspannerecosystem
- License: mit
- Created: 2019-08-30T00:52:46.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-09-24T07:57:39.000Z (5 months ago)
- Last Synced: 2025-09-24T09:44:02.351Z (5 months ago)
- Topics: golang, parser, spanner, sql
- Language: Go
- Homepage: https://cloudspannerecosystem.dev/memefish/
- Size: 2.6 MB
- Stars: 88
- Watchers: 6
- Forks: 25
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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