[chore] fmt readme
This commit is contained in:
parent
0669177a8b
commit
b816b0ecdb
|
@ -102,14 +102,15 @@ const db = new DAL({
|
||||||
url: "http://localhost:8111",
|
url: "http://localhost:8111",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// SELECT * FROM test t WHERE name GLOB '*son' AND age >= 18
|
||||||
const rows = db
|
const rows = db
|
||||||
.In("test t")
|
.In("test t")
|
||||||
.Find({
|
.Find({
|
||||||
name: { $glob: "*son" },
|
name: { $glob: "*son" },
|
||||||
age: { $gte: 18 },
|
age: { $gte: 18 },
|
||||||
}) // SELECT * FROM test t WHERE name GLOB '*son' AND age >= 18
|
})
|
||||||
.As(UserDTO) // Map every row to DTO
|
.As(UserDTO) // Map every row to DTO
|
||||||
.Rows(); // Get iterator
|
.Rows();
|
||||||
|
|
||||||
for await (const row of rows) {
|
for await (const row of rows) {
|
||||||
console.log(row); // Jason, Jackson
|
console.log(row); // Jason, Jackson
|
||||||
|
|
Loading…
Reference in a new issue