New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/mstgnz/sqlporter

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mstgnz/sqlporter

  • v0.6.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

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 Apache License 2.0 - see the LICENSE file for details.

FAQs

Package last updated on 29 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc