1.1.0 • Published 4 years ago

@segment/mysql-query-validator v1.1.0

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

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'
}
1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago