@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/validate-unicode

The @databases/validate-unicode package validates and strips out invalid byte sequences from unicode strings in JavaScript. This is important because JavaScript does not enforce that strings with multi-byte characters are valid, but many other systems can crash or behave in unexpected ways when encountering these strings.

API

/**
 * Replace any un-matched surrogate pairs with \uFFFD so that
 * the string is guaranteed to be a valid utf8 string.
 */
export declare function removeInvalidUnicode(str: string): string;

/**
 * Return true if there are no un-matched surrogate pairs, otherwise
 * return false.
 */
export declare function isValidUnicode(str: string): boolean;

/**
 * Throw an error if the string has unmatched surrogate pairs
 */
export default function assertValidUnicode(str: string): string;
← Previous
  • API
@Databases
Docs
PostgresMySQLSQLiteExpo/WebSQL
Community
User Showcase
More
BlogGitHubStar
Copyright © 2021 ForbesLindesay