UNPKG

sails-arangojs

Version:

A sails-arangojs adapter for Sails / Waterline

22 lines (20 loc) 2.29 kB
// ███████╗███████╗ ██████╗ █████╗ ██████╗ ███████╗ ████████╗ █████╗ ██████╗ ██╗ ███████╗ // ██╔════╝██╔════╝██╔════╝██╔══██╗██╔══██╗██╔════╝ ╚══██╔══╝██╔══██╗██╔══██╗██║ ██╔════╝ // █████╗ ███████╗██║ ███████║██████╔╝█████╗ ██║ ███████║██████╔╝██║ █████╗ // ██╔══╝ ╚════██║██║ ██╔══██║██╔═══╝ ██╔══╝ ██║ ██╔══██║██╔══██╗██║ ██╔══╝ // ███████╗███████║╚██████╗██║ ██║██║ ███████╗ ██║ ██║ ██║██████╔╝███████╗███████╗ // ╚══════╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝ // // ███╗ ██╗ █████╗ ███╗ ███╗███████╗ // ████╗ ██║██╔══██╗████╗ ████║██╔════╝ // ██╔██╗ ██║███████║██╔████╔██║█████╗ // ██║╚██╗██║██╔══██║██║╚██╔╝██║██╔══╝ // ██║ ╚████║██║ ██║██║ ╚═╝ ██║███████╗ // ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ // // Given a table name, escape it for the database and add the postgres schema // if needed. module.exports = function escapeTableName(name) { name = `\`${name}\``; return name; };