Skip to content

CreateDatabase

zerovian edited this page Jan 29, 2020 · 6 revisions

Example

    
plugins {
  id "oe.espresso.latte" version "0.2.3"
}

import oe.espresso.latte.*

task createDB(type: CreateDatabase) {
    dbName = "sports2020"
    destDir = "${buildDir}/db"
    sourceDb = "$System.env.DLC/sports2020"
    largeFiles = true
}

Use the command ./gradlew createDB to run this example.

If successful, there should be a sports2020.db file in build/db of your project.

Properties

Attribute Required Description Default value
dbName Yes Database name None
destDir No Destination directory where to create the database Project basedir
sourceDb No Copy specified DB to target DB. If attribute is not provided, the empty DB is used
schemaFile No Initial dump file(s) to load into database. Separate dump filenames with commas. Files are resolved first as an absolute path, then relative to base directory. Wildcards are not expanded None
structFile No Structure description file None
blockSize No Block size in kilobytes (1, 2, 4 or 8). Can't be used with sourceDb attribute 8
noInit No No initialization of database schema (procopy emptyX dbName), can't be used with sourceDb attribute False
codepage No Copy empty database from a prolang subdirectory. Can't be used with sourceDb attribute. None
wordRules No Assign a specific word rules table to a database (ie runs a proutil dbname -C word-rules XXX). This command is run before loading schema (if available) None
multiTenant No Enable multitenancy for this database. False
failOnError No Only during schema load True
collation No Load collation table (copy from $DLC/prolang or $DLC/prolang/codepage) None
tempDir No -T parameter when loading schema None
cpInternal No -cpinternal parameter when loading schema None
cpStream No -cpstream parameter when loading schema None
cpCase No -cpcase parameter when loading schema None
cpColl No -cpcoll parameter when loading schema None
newInstance No Appends -newInstance in the procopy command line. False
largeFiles No Enable large files for this database. False
relative No Appends -relative in the procopy command line. False
auditing No Enable auditing for this database. False
auditArea No Audit tables area name None
auditIndexArea No Audit indexes area name None

Please refer to PCTCreateDatabase for more information.