JSPM

@ronin/compiler

0.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1114
    • Score
      100M100P100Q105562F
    • License MIT

    Compiles RONIN queries to SQL statements.

    Package Exports

    • @ronin/compiler
    • @ronin/compiler/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ronin/compiler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    RONIN Compiler

    This package compiles RONIN queries to SQL statements.

    Usage

    import { compileQueryInput } from '@ronin/compiler';
    
    const query = {
      get: {
        accounts: null,
      },
    };
    
    const schemas = [
      {
        pluralSlug: 'accounts',
        slug: 'account',
      },
    ];
    
    const { writeStatements, readStatement } = compileQueryInput(query, schemas);
    
    console.log(readStatement);
    // SELECT * FROM "accounts" ORDER BY "ronin.createdAt" DESC LIMIT 101

    Testing

    Use the following command to run the test suite:

    bun test