Quickly test out model configurations and transactions
Clone the repository
$ git clone https://github.com/omaraboumrad/dryorm
Build the stack
$ docker-compose build
$ docker-compose up -d
In order to contribute an executor, you need to deliver the following:
- a self-sufficient image (preferably light)
- that takes
MODELS
andTRANSACTION
env variables - either fails with a none-zero error (stderr)
- or succeeds with a json result
The following example shows a sample of how the container will be called:
% docker run --rm\
-e MODELS="$(cat executor/example/models.py)" \
-e TRANSACTION="$(cat executor/example/transaction.py)" \
dryorm/executor
{
"output": "Available Drivers: ['john', 'doe', 'jane', 'smith']\n",
"queries": [
{
"sql": "INSERT INTO \"core_driver\" (\"name\") SELECT 'john' UNION ALL SELECT 'doe' UNION ALL SELECT 'jane' UNION ALL SELECT 'smith'",
"time": "0.000"
},
{
"sql": "SELECT \"core_driver\".\"name\" FROM \"core_driver\"",
"time": "0.000"
}
]
}