Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A high-performance SQL parser and converter library written in Go, designed to handle large-scale database schema migrations and transformations.

License

Notifications You must be signed in to change notification settings

developgo/sqlmapper

Repository files navigation

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

go get github.com/mstgnz/sqlmapper

Usage

Basic Usage

package main
import (
 "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 MIT License - see the LICENSE file for details.

About

A high-performance SQL parser and converter library written in Go, designed to handle large-scale database schema migrations and transformations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.7%
  • Dockerfile 0.3%

AltStyle によって変換されたページ (->オリジナル) /