Christopher Vagnetoft
30dfd4889b
* Added request logging to com.noccy.apiclient * Added plugin com.noccy.watcher * Added pipe command and filter support * Fixes and stubs
34 lines
690 B
Markdown
34 lines
690 B
Markdown
# PDO Plugin
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
Storing queries:
|
|
|
|
$ spark pdo:store --res otherdb \ # store resource with query
|
|
"getuserid" \ # Query name
|
|
"select id from users where username=:username" \ # query
|
|
:username # slot
|
|
|
|
List stored queries:
|
|
|
|
$ spark pdo:store
|
|
|
|
Delete a stored query:
|
|
|
|
$ spark pdo:store --remove getuserid
|
|
|
|
Recalling queries:
|
|
|
|
$ spark pdo:query --recall getuserid username=bob
|
|
|
|
Direct query:
|
|
|
|
$ spark pdo:query "select * from users"
|
|
$ spark pdo:query --res otherdb "select * from users"
|
|
$ spark pdo:query --vertical "select * from user where id=:id" id=42
|
|
$ spark pdo:query --box --vertical "select name,value from config"
|
|
|