Options
All
  • Public
  • Public/Protected
  • All
Menu

sql-ts-knex-generator

Index

References

Namespaces

Interfaces

Variables

Functions

References

Column

Re-exports Column

Database

Re-exports Database

Table

Re-exports Table

Variables

Const default

default: { fromObject: typeof fromObject; toObject: typeof toObject; toTypeScript: typeof toTypeScript }

Type declaration

Functions

fromObject

  • Generates TypeScript from an exported database definition.

    Parameters

    • database: DecoratedDatabase

      The database object as exported from sql-ts

    • config: Config

      The configuration to generate the TypeScript from.

    Returns string

toObject

  • Generates a Database definition as a plain JavaScript object.

    Parameters

    • config: Config

      The configuration to generate this database with.

    Returns Promise<DecoratedDatabase>

    The Database definition as a plain JavaScript object.

toTypeScript

  • toTypeScript(config: Config): Promise<string>
  • Generates a Database definition as a series of TypeScript interfaces.

    Parameters

    • config: Config

      The configuration to generate this database with.

    Returns Promise<string>

    The Database definition as a series of TypeScript interfaces.

Generated using TypeDoc