SchemaJS
  • Getting Started
    • Preview
    • Setting up your environment
    • Hello World
  • Fundamentals
    • TypeScript Support
    • Module Imports
    • Custom Queries
    • Hooks
  • Reference Guides
    • SchemaJS Global
      • Table
      • Column
      • DataTypes
      • QueryBuilder
      • query
      • rawInsert
      • insert
      • print
    • Examples
Powered by GitBook
On this page
  1. Reference Guides
  2. SchemaJS Global

rawInsert

PreviousqueryNextinsert

Last updated 7 months ago

The rawInsert function in SchemaJS is a low-level, asynchronous method designed to insert data directly into a database and table without relying on the global context (SJS_CONTEXT). It provides flexibility for inserting data into any specified table by directly specifying the database and table names. This makes rawInsert ideal for use cases where the global context is not available or necessary, such as when performing batch operations, dynamic inserts, or when a more direct approach is preferred over the built-in method.

function rawInsert(dbName: string, tableName: string, data: any);
insert