OMIT clause
The OMIT clause is used to omit fields from the result set which can be particularly useful when querying large datasets.
Syntax
Clause Syntax
OMIT @fields FROM @table
Examples
CREATE person:tobie SET
name = 'Tobie',
password = '123456',
opts.security = 'secure',
opts.enabled = true;
CREATE person:jaime SET
name = 'Jaime',
password = 'asdfgh',
opts.security = 'secure',
opts.enabled = false;
SELECT * FROM person;
SELECT * OMIT password, opts.security FROM person;
SELECT * OMIT password, opts.{ security, enabled } FROM person;
Return fields
[
{
id: person:jaime,
name: 'Jaime',
opts: {
enabled: false,
security: 'secure'
},
password: 'asdfgh'
},
{
id: person:tobie,
name: 'Tobie',
opts: {
enabled: true,
security: 'secure'
},
password: '123456'
}
]
[
{
id: person:jaime,
name: 'Jaime',
opts: {
enabled: false
}
},
{
id: person:tobie,
name: 'Tobie',
opts: {
enabled: true
}
}
]
[
{
id: person:jaime,
name: 'Jaime',
opts: {}
},
{
id: person:tobie,
name: 'Tobie',
opts: {}
}
]