H2 datasource config for an in-memory H2 database

    0

    2

    Michael Born

    databasedatasourceH2-Database

    The code specifies a simple configuration for an H2 in-memory database.

    Shortcut: H2datasource

    Filename pattern: Application.cfc

    // H2 datasource
    // Inline datasources are only supported in Lucee.
    this.datasource={
      class: 'org.h2.Driver'
      , bundleName: 'org.h2'
      , connectionString: 'jdbc:h2:#getDirectoryFromPath(getCurrentTemplatePath())#/datasource/db;MODE=MySQL'
    };
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.