Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict'
- /*
- The following will generate an SQL SELECT statement.
- */
- function sql(string, column, table){
- return `${string[0]}${column]${string[1]}${table}#{string[2]}`
- }
- let column = 'name';
- let table = 'users';
- sql`SELECT ${column} FROM ${table};` // SELECT name FROM users;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement