Options
All
  • Public
  • Public/Protected
  • All
Menu

SQL Template Engine

Hierarchy

  • SqlTemplateEngine

Index

Methods

invokeAbstractSyntaxTree

  • invokeAbstractSyntaxTree(abstractSyntaxTree: AbstractSyntaxTree, data: object): Promise<string[]>
  • Invoke an abstract syntax tree with a set of input data

    throws

    {RuntimeError} if there was unexpected statement, an expression error, an invalid template path or a data path reference error

    throws

    {RuntimeReadError} if there was an error reading a template file

    throws

    {RuntimeMaximumCallStackExceededError} if the maximum call depth is exceeded

    Parameters

    • abstractSyntaxTree: AbstractSyntaxTree

      The abstract syntax tree instance

    • data: object

      The template input data

    Returns Promise<string[]>

    Resolves to an array of the output lines

invokeTemplateFile

  • invokeTemplateFile(file: string, data: object): Promise<string>
  • Invoke a template file with a set of input data

    throws

    {RuntimeError} if there was unexpected statement, an expression error, an invalid template path or a data path reference error

    throws

    {RuntimeReadError} if there was an error reading a template file

    throws

    {RuntimeMaximumCallStackExceededError} if the maximum call depth is exceeded

    Parameters

    • file: string

      The path to the template file

    • data: object

      The template input data

    Returns Promise<string>

    Resolves to an array of the output lines

loadTemplateFile

  • Load a template file returning an abstract syntax tree

    throws

    {ParserError} if there are not enough tokens of the token does not match the passed types

    throws

    {FileLoadError} if the template file cannot be read

    Parameters

    • file: string

      The path to the template file

    Returns Promise<AbstractSyntaxTree>

    Resolves to an abstract syntax tree

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc