select<class>([<expression>])

select<class>([<expression>])  [--format=json | xml | simple] [--max_objects] [--verbose] [--fetch_referenced_objects] [--object_ids]

Select objects from type <class> that matches the specified <expression>. This command requires connection to a user database. See also Query language.

Options

Option

Values

Explanation

–format, -f

json, xml, simple

output format

–max_objects, -m

max number of objects in output

–verbose, -v

prints additional statistics

–fetch_referenced_objects, -r

fetch_referenced_objects

–object_ids, -o

return ids of objects rather than the objects

Example

tomas@tomsmbp:~/ > dboo example_queries -u=example_user -p=password
dboo example_user@example_queries> select<Product>()
{"dboo::objectid" : "5c008a1c791c000e", "dboo::class" : "Product", "_name" : "Milk", "_description" : "", "_price" : 14.949999999999999}
{"dboo::objectid" : "5c008a1c791c000f", "dboo::class" : "Product", "_name" : "Apple", "_description" : "", "_price" : 5.9500000000000002}
{"dboo::objectid" : "5c008a1c791c0010", "dboo::class" : "Product", "_name" : "Bread", "_description" : "", "_price" : 28.949999999999999}
{"dboo::objectid" : "5c008a1c791c0011", "dboo::class" : "Product", "_name" : "Juice", "_description" : "", "_price" : 34.950000000000003}
{"dboo::objectid" : "5c008a1c791c0012", "dboo::class" : "Product", "_name" : "Banana", "_description" : "", "_price" : 20}
{"dboo::objectid" : "5c008a1c791c0013", "dboo::class" : "Product", "_name" : "Biscuits", "_description" : "", "_price" : 23.949999999999999}
dboo example_user@example_queries> select<Product>(gt(_price,20))
{"dboo::objectid" : "5c008a1c791c0010", "dboo::class" : "Product", "_name" : "Bread", "_description" : "", "_price" : 28.949999999999999}
{"dboo::objectid" : "5c008a1c791c0011", "dboo::class" : "Product", "_name" : "Juice", "_description" : "", "_price" : 34.950000000000003}
{"dboo::objectid" : "5c008a1c791c0013", "dboo::class" : "Product", "_name" : "Biscuits", "_description" : "", "_price" : 23.949999999999999}
tomas@tomsmbp:~/ > dboo example_queries -u=example_user -p=password -- "select<Product>()"
{"dboo::objectid" : "5c008a1c791c000e", "dboo::class" : "Product", "_name" : "Milk", "_description" : "", "_price" : 14.949999999999999}
{"dboo::objectid" : "5c008a1c791c000f", "dboo::class" : "Product", "_name" : "Apple", "_description" : "", "_price" : 5.9500000000000002}
{"dboo::objectid" : "5c008a1c791c0010", "dboo::class" : "Product", "_name" : "Bread", "_description" : "", "_price" : 28.949999999999999}
{"dboo::objectid" : "5c008a1c791c0011", "dboo::class" : "Product", "_name" : "Juice", "_description" : "", "_price" : 34.950000000000003}
{"dboo::objectid" : "5c008a1c791c0012", "dboo::class" : "Product", "_name" : "Banana", "_description" : "", "_price" : 20}
{"dboo::objectid" : "5c008a1c791c0013", "dboo::class" : "Product", "_name" : "Biscuits", "_description" : "", "_price" : 23.949999999999999}
tomas@tomsmbp:~/ > dboo example_queries -u=example_user -p=password -- "select<Product>(lt(_price,20))"
{"dboo::objectid" : "5c008a1c791c000e", "dboo::class" : "Product", "_name" : "Milk", "_description" : "", "_price" : 14.949999999999999}
{"dboo::objectid" : "5c008a1c791c000f", "dboo::class" : "Product", "_name" : "Apple", "_description" : "", "_price" : 5.9500000000000002}