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.
- 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
- 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
go get github.com/mstgnz/sqlmapperpackage main
import (
"fmt""github.com/mstgnz/sqlmapper"
)
funcmain() {
// Create a new parser for your database typeparser:=sqlmapper.NewParser(sqlmapper.MySQL)
// Parse SQL contentschema, err:=parser.Parse(sqlContent)
iferr!=nil {
panic(err)
}
// Generate SQL from schemasql, err:=parser.Generate(schema)
iferr!=nil {
panic(err)
}
}- Tables
- Columns with data types
- Primary keys
- Foreign keys
- Unique constraints
- Check constraints
- Views
- Functions
- Procedures
- Triggers
- Indexes
- Sequences
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.