Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mstgnz/sqlmapper
A high-performance SQL parser and converter library written in Go, designed to handle large-scale database schema migrations and transformations.
https://github.com/mstgnz/sqlmapper
converter dump go sql sqlmapper sqlporter
Last synced: 1 day ago
JSON representation
A high-performance SQL parser and converter library written in Go, designed to handle large-scale database schema migrations and transformations.
- Host: GitHub
- URL: https://github.com/mstgnz/sqlmapper
- Owner: mstgnz
- License: apache-2.0
- Created: 2024-01-23T12:50:27.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-12-29T15:24:54.000Z (17 days ago)
- Last Synced: 2025-01-13T04:08:21.397Z (2 days ago)
- Topics: converter, dump, go, sql, sqlmapper, sqlporter
- Language: Go
- Homepage:
- Size: 2.19 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# SQLMapper
SQLMapper is a powerful SQL schema parser and generator that supports multiple database systems. It can parse SQL dump files and generate schema definitions in a standardized format.
## Features
- Multi-database support:
- MySQL
- PostgreSQL
- SQLite
- SQL Server
- Oracle
- Schema parsing and generation
- Support for various SQL objects:
- Tables
- Views
- Functions
- Procedures
- Triggers
- Indexes
- Sequences## Development Status
- Basic schema parsing and generation is implemented
- Stream processing feature is under development
- Basic stream parsing functionality is implemented
- Tests for stream processing are pending
- Parallel stream processing is planned
- Documentation will be updated as features are completed## Installation
```bash
go get github.com/mstgnz/sqlmapper
```## Usage
### Basic Usage
```go
package mainimport (
"fmt"
"github.com/mstgnz/sqlmapper"
)func main() {
// Create a new parser for your database type
parser := sqlmapper.NewParser(sqlmapper.MySQL)
// Parse SQL content
schema, err := parser.Parse(sqlContent)
if err != nil {
panic(err)
}
// Generate SQL from schema
sql, err := parser.Generate(schema)
if err != nil {
panic(err)
}
}
```## Supported SQL Objects
- Tables
- Columns with data types
- Primary keys
- Foreign keys
- Unique constraints
- Check constraints
- Views
- Functions
- Procedures
- Triggers
- Indexes
- Sequences## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.