mysql-query-validator
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.4 • Public • Published

    mysql-query-validator

    This is just a simple wrapper over this Golang executable to validate SQL queries.

    Installation

    yarn add mysql-query-validator

    Example

    import { validate } from 'mysql-query-validator'
     
    try {
      validate(`
        create table test (
          id varchar(20) not null,
          created_at datetime(6),
          slug varbinary(255),
          enabled tinyint(1),
          labels json // missing comma
          url blob
        )
      `)
    } catch (err) {
      console.error(err.message) // syntax error at position N near 'url'
    }

    Install

    npm i mysql-query-validator

    DownloadsWeekly Downloads

    55

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    17.6 MB

    Total Files

    15

    Last publish

    Collaborators

    • stevenmiller888