A schema extractor for MySQL.
yarn add ts-mysql-schema
# or
npm install ts-mysql-schema
import { MySQLSchema } from 'ts-mysql-schema'
const mySQLSchema = new MySQLSchema({
uri: 'mysql://[email protected]:3010/test'
})
const schema = await mySQLSchema.getSchema()
console.log(schema)
The code is mostly derived from Netto Farah's awesome mysql-schema-ts library. The difference here is that instead of returning the converted TypeScript interfaces, we're just returning the schema.
- ts-mysql-parser - A standalone, grammar-complete MySQL parser
- ts-mysql-analyzer - A MySQL query analyzer
- ts-mysql-uri - Parse a MySQL connection URI
- ts-antlr4-scanner - A scanner for antlr4-based lexers
stevenmiller888.github.io · GitHub @stevenmiller888 · Twitter @stevenmiller888