https://github.com/yindia/xray
About Xray: Simplify database structure extraction for MySQL, PostgreSQL, BigQuery, Redshift, MsSQL and Snowflake in Go
https://github.com/yindia/xray
bigquery mssql mysql postgressql rds redshift snowflake
Last synced: about 1 month ago
JSON representation
About Xray: Simplify database structure extraction for MySQL, PostgreSQL, BigQuery, Redshift, MsSQL and Snowflake in Go
- Host: GitHub
- URL: https://github.com/yindia/xray
- Owner: yindia
- Created: 2025-06-24T08:34:27.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-24T08:36:55.000Z (12 months ago)
- Last Synced: 2025-06-24T09:43:34.283Z (12 months ago)
- Topics: bigquery, mssql, mysql, postgressql, rds, redshift, snowflake
- Language: Go
- Homepage: https://pkg.go.dev/github.com/thesaas-company/xray
- Size: 93.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# XRay
**XRay** is an open-source Go library and CLI tool for database schema extraction and query execution. It supports multiple databases and provides a unified interface for developers and data engineers.
---
## Features
- Extracts schema metadata from popular databases.
- Executes SQL queries across different engines.
- Unified API for multiple backends.
- Easy integration into Go projects.
- CLI for quick inspection and automation.
---
## Installation
### Library
```bash
go get github.com/yindia/xray@latest
```
### CLI
#### MacOS
```bash
brew install yindia/homebrew-tap/xray
```
#### Linux
```bash
curl -sL https://raw.githubusercontent.com/yindia/xray/main/install.sh | sudo bash -s -- -b /usr/local/bin
```
---
## Quick Start
### Go Library Example
```go
package main
import (
"github.com/yindia/xray"
"github.com/yindia/xray/config"
)
func main() {
cfg := config.Config{
// Fill in your database config here
}
client, err := xray.NewClient(cfg)
if err != nil {
panic(err)
}
schema, err := client.ExtractSchema()
if err != nil {
panic(err)
}
// Use schema metadata
fmt.Println(schema)
}
```
See [example/{database}/main.go](./example/) for full working examples for each supported database.
---
## Supported Databases
- MySQL
- PostgreSQL
- Redshift
- BigQuery
- Snowflake
- MSSQL
---
## Integration Guides
- [MySQL Integration](./example/mysql/integration.md)
- [Postgres Integration](./example/postgres/integration.md)
- [Redshift Integration](./example/redshift/integration.md)
- [BigQuery Integration](./example/bigquery/integration.md)
- [Snowflake Integration](./example/snowflake/integration.md)
- [MSSQL Integration](./example/mssql/integration.md)
## Example Projects
- [MySQL Example](./example/mysql/README.md)
- [Postgres Example](./example/postgres/README.md)
- [Redshift Example](./example/redshift/README.md)
- [BigQuery Example](./example/bigquery/README.md)
- [Snowflake Example](./example/snowflake/README.md)
- [MSSQL Example](./example/mssql/README.md)
---
## CLI Usage
See [CLI Getting Started](./cli/README.md) for full documentation.
---
## Documentation
- [GoDoc Reference](https://pkg.go.dev/github.com/yindia/xray)
---
## Contributing
Contributions are welcome! Please open issues or pull requests.
---
## License
[MIT](./LICENSE)
---
## Show Your Support
If you find XRay useful, please consider starring the repository on GitHub!