Skip to content
David Nichols edited this page Aug 23, 2024 · 3 revisions

Environment Variable

  • QORE_DATA_PROVIDERS: determines the Qore-language modules that are automatically loaded to provide Data Providers
  • QORE_TYPESCRIPT_ACTION_SCRIPTS: determines JavsScript code that is loaded to provide DataProvider application actions (the source is assumed to be TypeScript)

How to use the qdp command-line interface

Ex: browse the data provider hierarchy

$ QORE_TYPESCRIPT_ACTION_SCRIPTS=~/src/qore/git/module-v8/ts/dist/index.js qdp ts-actions{}
["js-test"]
$ QORE_TYPESCRIPT_ACTION_SCRIPTS=~/src/qore/git/module-v8/ts/dist/index.js qdp ts-actions{}/js-test
["test-api"]
$ QORE_TYPESCRIPT_ACTION_SCRIPTS=~/src/qore/git/module-v8/ts/dist/index.js qdp ts-actions{}/js-test/test-api
test-api has no children

Ex: Get information about request and response types from a data provider factory

$ QORE_TYPESCRIPT_ACTION_SCRIPTS=~/src/qore/git/module-v8/ts/dist/index.js qdp ts-actions{}/js-test/test-api request 
int count
string other
*bool unimportant
$ QORE_TYPESCRIPT_ACTION_SCRIPTS=~/src/qore/git/module-v8/ts/dist/index.js qdp ts-actions{}/js-test/test-api response
int result
string status (one of: ["OK", "Error"])

Ex: Make a request to a request-response (API-based) data provider

$ QORE_TYPESCRIPT_ACTION_SCRIPTS=~/src/qore/git/module-v8/ts/dist/index.js qdp ts-actions{}/js-test/test-api dor count=1,other=this
obj + 1 = NaN (OK)
hash: (2 members)
  result : 2
  status : "OK"

Arguments (count=1,other=this) are provided in the format parsed by parse_to_qore_value()