
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
nodenamo-query-parser
Advanced tools
Nodenamo Query Language Parser
import {parse} from 'nodenamo-query-parser'
let statement = parse('FIND * FROM users WHERE department = "IT" FILTER enabled = true ORDER ASC LIMIT 10')
console.log(statement)
{
type: 'find',
projections: undefined,
from: 'users',
using: undefined,
where: {
expressionAttributeNames: { '#department': 'department' },
expressionAttributeValues: { ':department': 'IT' },
keyConditions: '#department = :department'
},
filter: {
expressionAttributeNames: { '#enabled': 'enabled' },
expressionAttributeValues: { ':enabled': true },
filterExpression: '#enabled = :enabled'
},
resume: undefined,
order: true,
limit: 10,
stronglyConsistent: undefined
}
IMPORT class FROM "path" IMPORT class AS alias FROM "path" IMPORT {class} FROM "path" IMPORT {class as alias} FROM "path"
where:
class is the exported class decorated with nodenamo's @DBTable
alias is an alias to be referenced to the imported class from subsequent statements.
path is the path to the file or a package containing the class to import.
IMPORT usersTable as users FROM "./usersTable.ts"
{
type: 'import',
entity: [ { name: 'usersTable', as: 'users', default: true } ],
from: './usersTable.ts'
}
INSERT jsonObject INTO table WHERE expression
INSERT {id:2,title:"some thing",price:21,status:true} INTO books WHERE attribute_not_exists(id)
{
type: 'insert',
object: { id: 2, title: 'some thing', price: 21, status: true },
into: 'books',
where: {
expressionAttributeNames: { '#id': 'id' },
expressionAttributeValues: {},
conditionExpression: 'attribute_not_exists(#id)'
}
}
GET id FROM table STRONGLY CONSISTENT
GET 42 FROM users STRONGLY CONSISTENT
{
type: 'get',
id: 42,
from: 'users',
stronglyConsistent: true
}
LIST projections FROM table USING indexName BY hashRange FILTER filterExpressions RESUME "lastEvaluatedKey" ORDER order LIMIT number STRONGLY CONSISTENT
where:
projections is a list of properties to return. Use * to return all properties.indexName is the name of a GSI.hashRange is a value to search against a hash property. It can be optionally followed by a comma and a value to search against a range property.order is ASC or DESCstrongly consistent can be used to request a consistent read.LIST * FROM users BY "name" , "timestamp" FILTER email = "someone@example.com" ORDER asc LIMIT 10 STRONGLY CONSISTENT
{
type: 'list',
projections: undefined,
from: 'users',
using: undefined,
by: { hash: 'name', range: 'timestamp' },
filter: {
expressionAttributeNames: { '#email': 'email' },
expressionAttributeValues: { ':email': 'someone@example.com' },
filterExpression: '#email = :email'
},
resume: undefined,
order: true,
limit: 10,
stronglyConsistent: true
}
FIND projections FROM table USING indexName WHERE keyConditions FILTER filterExpressions RESUME "lastEvaluatedKey" ORDER order LIMIT number STRONGLY CONSISTENT
where:
projections is a list of properties to return. Use * to return all properties.indexName is the name of a GSI.order is ASC or DESCstrongly consistent can be used to request a consistent read.FIND id, name, email FROM users USING users-gsi WHERE name = "some one" FILTER email = "someone@example.com" resume "token" ORDER desc LIMIT 2 STRONGLY CONSISTENT
{
type: 'find',
projections: [ 'id', 'name', 'email' ],
from: 'users',
using: 'users-gsi',
where: {
expressionAttributeNames: { '#name': 'name' },
expressionAttributeValues: { ':name': 'some one' },
keyConditions: '#name = :name'
},
filter: {
expressionAttributeNames: { '#email': 'email' },
expressionAttributeValues: { ':email': 'someone@example.com' },
filterExpression: '#email = :email'
},
resume: 'token',
order: false,
limit: 2,
stronglyConsistent: true
}
UPDATE jsonObject FROM table WHERE conditionExpression RETURNING returnValue WITH VERSION CHECK
where:
WITH VERSION CHECK can be used to request a version check.returnValue is NONE, ALLNEW, or ALLOLDUPDATE {id:1,name:"new name"} FROM users WHERE attribute_not_exists(id) RETURNING ALLOLD WITH VERSION CHECK
{
type: 'update',
object: { id: 1, name: 'new name' },
from: 'users',
where: {
expressionAttributeNames: { '#id': 'id' },
expressionAttributeValues: {},
conditionExpression: 'attribute_not_exists(#id)'
},
versionCheck: true,
returning: AllNew
}
ON id FROM table SETsetExpression ADD addExpression DELETE deleteExpression REMOVE removeExpression conditionExpression RETURNING returnValue WITH VERSION CHECK
where:
WITH VERSION CHECK can be used to request a version check.returnValue is NONE, ALLNEW, or ALLOLDON 42 FROM users SET lastViewed = "today" ADD count 1 WHERE published = true WITH VERSION CHECK
{
type: 'on',
id: 42,
from: 'users',
set: {
setExpressions: [ '#lastViewed___1 = :lastViewed___1' ],
expressionAttributeNames: { '#lastViewed___1': 'lastViewed' },
expressionAttributeValues: { ':lastViewed___1': 'today' }
},
add: {
addExpressions: [ '#count___2 :count___2' ],
expressionAttributeNames: { '#count___2': 'count' },
expressionAttributeValues: { ':count___2': 1 }
},
remove: undefined,
delete: undefined,
where: {
expressionAttributeNames: { '#published': 'published' },
expressionAttributeValues: { ':published': true },
conditionExpression: '#published = :published'
},
versionCheck: true
}
DELETE id FROM table WHERE conditionExpression
DELETE 42 FROM books WHERE deleted <> true
{
type: 'delete',
id: 42,
from: 'books',
where: {
expression: '#deleted <> :deleted',
expressionAttributeNames: { '#deleted': 'deleted' },
expressionAttributeValues: { ':deleted': true }
}
}
UNLOAD TABLE name
where:
name is the imported class name or its alias.UNLOAD TABLE users
{
type: 'unload_table',
name: 'users'
}
CREATE TABLE FOR name WITH CAPACITY OF readCapacityNumber, writeCapacityNumber
where:
name is the imported class name or its alias.readCapacityNumber is the desired read capacity for the table.writeCapacityNumber is the desired write capacity for the table.CREATE TABLE FOR users WITH CAPACITY OF 123, 456
{
type: 'create_table',
for: 'users',
withCapacityOf: { readCapacity: 123, writeCapacity: 456 }
}
DELETE TABLE FOR name
where:
name is the imported class name or its alias.DELETE TABLE FOR users
{
type: 'delete_table',
for: 'users'
}
SHOW TABLES
SHOW TABLES
{
type: 'show_tables',
}
Explain statement
where:
statement is one of nodenamo query language stattements.EXPLAIN INSERT {id:1,name:"some one"} INTO users
{
type: 'explain',
statement: {
type: 'insert',
object: { id: 1, name: 'some one' },
into: 'users',
where: undefined
}
}
Describe name
where:
name is the imported class name or its alias.DESCRIBE users
{
type: 'describe',
name: 'users'
}
FAQs
A query parser for nodenamo
We found that nodenamo-query-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.