@Databases

@Databases

  • Building SQL Queries
  • Documentation

›Utilities

Getting Started

  • Building SQL Queries
  • Syntax Highlighting

Postgres

    Guides

    • Getting Started
    • Installation & Setup
    • Managing Connections
    • Querying Postgres
    • Using Transactions
    • Logging & Debugging
    • Migrations
    • Testing

    API

    • Connection Options
    • Queryable
    • Connection Pool
    • Connection
    • Transaction

MySQL

    Guides

    • Getting Started
    • Installation & Setup
    • Managing Connections
    • Querying MySQL
    • Using Transactions
    • Logging & Debugging
    • Testing

    API

    • Connection Options
    • Queryable
    • Connection Pool
    • Connection
    • Transaction

SQLite

  • API
  • Testing

Expo/Web SQL

  • API
  • Testing

Utilities

  • connection-pool
  • escape-identifier
  • lock
  • queue
  • validate-unicode

@databases/escape-identifier

The @databases/escape-identifier package escapes identifiers for use in SQL strings. Pass {extended: true} to enable unicode support. By default, identifiers are restricted to ASCII chracters

API

/**
 * Escapes a Postgres identifier.
 *
 * https://www.postgresql.org/docs/9.1/sql-syntax-lexical.html
 */
export declare function escapePostgresIdentifier(
  str: string,
  {
    extended,
  }?: {
    extended?: boolean;
  },
): string;

/**
 * Escapes a MySQL identifier.
 *
 * https://dev.mysql.com/doc/refman/5.7/en/identifiers.html
 */
export declare function escapeMySqlIdentifier(
  str: string,
  {
    extended,
  }?: {
    extended?: boolean;
  },
): string;

/**
 * Escapes an SQLite identifier.
 *
 * https://sqlite.org/lang_keywords.html
 */
export declare function escapeSQLiteIdentifier(str: string): string;
← connection-poollock →
  • API
@Databases
Docs
PostgresMySQLSQLiteExpo/WebSQL
Community
User Showcase
More
BlogGitHubStar
Copyright © 2021 ForbesLindesay