GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MitMaro/node-sql-template-engine: A template engine compatible with SQL files.

BranchesTags
Open more actions menu

Latest commit

 

History

25 Commits
25 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
scripts
scripts
 
 
src
src
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.nvmrc
.nvmrc
 
 
.nycrc
.nycrc
 
 
.travis.yml
.travis.yml
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig-base.json
tsconfig-base.json
 
 
tsconfig-build.json
tsconfig-build.json
 
 
tsconfig.json
tsconfig.json
 
 
tslint.json
tslint.json
 
 

Repository files navigation

SQL Template Engine

Service Status Build Status Coverage Status NPM version GitHub license Known Vulnerabilities

Install

npm install --save @mitmaro/sql-template-engine

Documentation

  • API Documentation

Usage

Creating an instance

Creating a SQL Template Engine instance is very straight forward.

JavaScript

const createSqlTemplateEngine = require('@mitmaro/sql-template-engine');
const sqlTemplateEngine = createSqlTemplateEngine({
    // options
});

TypeScript

import createSqlTemplateEngine from '@mitmaro/sql-template-engine';
const sqlTemplateEngine = createSqlTemplateEngine({
    // options
});

Options

Name Type Description Default
cache AbstractSyntaxTreeCache A custom abstract syntax tree cache Memory
epsilon number The allowed error due to rounding in floating point comparisons Number.EPSILON
fileEncoding string The file encoding for template files UTF-8
rootPath string The root directory for looking for template files Current working directory
maximumCallDepth number The maximum depth of nested includes 64

Invoking a template file

const result = await sqlTemplateEngine.invokeTemplateFile('template.tpl', {foo: 'bar'});

Development

Development is done using Node 8 and NPM 5, and tested against both Node 8 and Node 10. To get started

  • Install Node 8 from NodeJS.org or using nvm
  • Clone the repository using git clone [email protected]:MitMaro/node-sql-template-engine.git
  • cd node-sql-template-engine
  • Install the dependencies npm install
  • Make changes, add tests, etc.
  • Run linting and test suite using npm run test
  • Build using npm run build

License

This project is released under the ISC license. See LICENSE.

About

A template engine compatible with SQL files.

Resources

Readme
ISC license
Activity

Stars

3 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.