electrodb
Advanced tools
Comparing version 0.9.3 to 0.9.4
{ | ||
"name": "electrodb", | ||
"version": "0.9.3", | ||
"version": "0.9.4", | ||
"description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -765,2 +765,4 @@ | ||
`between` | `rent.between(minRent, maxRent)` | `(#rent between :rent1 and :rent2)` | ||
`name` | `rent.name()` | `#rent` | ||
`value` | `rent.value(maxRent)` | `:rent1` | ||
@@ -767,0 +769,0 @@ This functionality allows you to write the remaining logic of your `FilterExpression` with ease. Add complex nested `and`/`or` conditions or other `FilterExpression` logic while ElectroDB handles the `ExpressionAttributeNames` and `ExpressionAttributeValues`. |
@@ -81,2 +81,14 @@ let queryChildren = [ | ||
}, | ||
value: { | ||
template: function(name, value) { | ||
return value; | ||
}, | ||
strict: false | ||
}, | ||
name: { | ||
template: function(name) { | ||
return name; | ||
}, | ||
strict: false | ||
} | ||
}; | ||
@@ -83,0 +95,0 @@ |
@@ -230,2 +230,16 @@ process.env.AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1; | ||
}) | ||
it("Should allow for name and value filter values", async () => { | ||
let animals = await FilterTests.query | ||
.farm({pen}) | ||
.filter(({animal}) => ` | ||
${animal.name()} = ${animal.value("Pig")} | ||
`) | ||
.go(); | ||
console.log("animals", animals); | ||
expect(animals) | ||
.to.be.an("array") | ||
.and.have.length(1); | ||
expect(animals.map(pen => pen.animal)) | ||
.to.have.members(["Pig"]); | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
290657
6059
1847