Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
4080bfb
introduce pipeline proto changes
wu-hui Jun 6, 2024
608a75e
Add expressions, stages, and pipeline
wu-hui Jun 12, 2024
25ee91a
can run pipelines
wu-hui Jul 25, 2024
9ad2614
pipeline impl
wu-hui Jul 30, 2024
a514c65
Fix routing headers
wu-hui Aug 22, 2024
e957017
Basic initial converter support
wu-hui Aug 22, 2024
50f061b
Converter cleanup
wu-hui Aug 26, 2024
5947337
Address some feedbacks and add more nested field test.
wu-hui Aug 26, 2024
84e5eab
License header and tests fix
wu-hui Aug 26, 2024
eff4589
License header and tests fix
wu-hui Aug 26, 2024
0dd8b09
Merge remote-tracking branch 'origin/wuandy/PplPP' into wuandy/PplPP
wu-hui Aug 29, 2024
a3e62b5
Addressing comments.
wu-hui Sep 3, 2024
997c6c5
DTS + some other fixes.
wu-hui Sep 3, 2024
f0fdad5
FindNearest update
wu-hui Sep 5, 2024
f0ba8da
pipeline and stage dts fix done. expr to go.
wu-hui Sep 10, 2024
38b3981
fixing expression.ts type decl
wu-hui Sep 11, 2024
3aa8edd
length to strLength
wu-hui Sep 11, 2024
c97ed97
remove __path__ hack
wu-hui Sep 12, 2024
9116488
resync with expressions catelog
wu-hui Sep 25, 2024
670a124
comment out bit operations
wu-hui Sep 25, 2024
773bcd7
more syncs
wu-hui Sep 25, 2024
c22a2db
Fix rest connection by correct url endpoint.
wu-hui Oct 1, 2024
a0fb269
documentation fix
wu-hui Oct 1, 2024
b43de57
Fix system tests build error by not using `instanceof firestore.Expr`…
wu-hui Oct 1, 2024
1d9c585
remove __path__
wu-hui Oct 2, 2024
d9194b7
add reference test
wu-hui Oct 3, 2024
091ddf0
added transaction support.
wu-hui Oct 4, 2024
14b67dd
Add comments
wu-hui Oct 4, 2024
0c04b48
add remove_fields support
wu-hui Oct 24, 2024
91bd76e
add d.ts change for removeFields
wu-hui Oct 24, 2024
cb9d692
fix build
MarkDuckworth Nov 18, 2024
5db7307
Rename cond, *minimum, *maximum, eqAny, and notEqAny. New tests. Impl…
MarkDuckworth Nov 20, 2024
61fc782
chore: Merge main and resolve conflicts. (#2240)
tom-andersen Dec 9, 2024
db8a43b
feature: New Pipeline Stages (#2236)
tom-andersen Jan 17, 2025
7511ff9
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 17, 2025
8edd4d4
Merge remote-tracking branch 'origin' into feat/pipelines
MarkDuckworth Apr 15, 2025
db0c60f
Building
MarkDuckworth Apr 17, 2025
1276253
Passing main set of integration tests
MarkDuckworth Apr 18, 2025
628f432
Ignore unused params named '_', do not generate eslint warning.
MarkDuckworth Apr 22, 2025
28163d4
Implement query to pipeline tests and fixes. Also corrected many lint…
MarkDuckworth Apr 22, 2025
7d4277f
pipelines proto update (#2373)
MarkDuckworth Jul 1, 2025
8f9d636
feat: separate pipelines API into a subpackage '@google-cloud/firesto…
MarkDuckworth Jul 23, 2025
08b0682
pipeline options with explain-analyze (#2372)
MarkDuckworth Jul 23, 2025
0e5b45e
Merge branch 'main' of github.com:googleapis/nodejs-firestore into fe…
MarkDuckworth Jul 23, 2025
731dfe6
Test error propagation for pipelines (#2390)
MarkDuckworth Jul 31, 2025
689a03d
More expressions and API cleanup (#2393)
MarkDuckworth Oct 21, 2025
c5f20bc
API audit edits (#2441)
MarkDuckworth Oct 29, 2025
747f8fc
Merge branch 'main' of github.com:googleapis/nodejs-firestore into fe…
MarkDuckworth Oct 29, 2025
e60cedf
add split, type, timestampTrunc, and fix trim
MarkDuckworth Oct 31, 2025
826ac65
Merge branch 'main' of github.com:googleapis/nodejs-firestore into fe…
MarkDuckworth Nov 3, 2025
9e7d183
Add pre-release version identifier
MarkDuckworth Nov 3, 2025
19bafde
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Nov 4, 2025
3ed8a6f
fix copyright header year
MarkDuckworth Nov 4, 2025
9c3e496
update version number of pipelines prerelease: 8.1.0-eap-pipelines.2
MarkDuckworth Nov 7, 2025
3a6e952
Add export ./build/src/path for backward compatible support for fireb…
MarkDuckworth Nov 8, 2025
2943461
Merge branch 'feat/pipelines' of github.com:googleapis/nodejs-firesto…
MarkDuckworth Nov 10, 2025
67a3730
Update readme-partials to include samples for using the Pipelines API
MarkDuckworth Dec 12, 2025
73eaef6
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Dec 13, 2025
d36bb0c
Tweaking the readme-partials to get syntax highlighting
MarkDuckworth Dec 13, 2025
f27a6a3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Dec 13, 2025
fe0ce84
Merge branch 'main' of github.com:googleapis/nodejs-firestore into fe…
MarkDuckworth Dec 15, 2025
0bcef58
Ignore lint errors in generated code
MarkDuckworth Dec 16, 2025
8468a7a
Fixing and skipping tests when running against enterprise
MarkDuckworth Dec 16, 2025
c23f53d
fix mocha_extensions
MarkDuckworth Dec 17, 2025
24de65e
Improve TODO message on listCollections test
MarkDuckworth Dec 18, 2025
3be33ea
Port BooleanExpression subclasses from Web
MarkDuckworth Dec 29, 2025
4f4abbe
Fixing failing CI tests: includes fixes for query to pipeline conversion
MarkDuckworth Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"overrides": [
{
"files": [
"dev/src/*.ts"
"dev/src/**/*.ts"
],
"excludedFiles": [
"dev/src/v1/*.ts",
"dev/src/v1beta1/*.ts"
],
"parser": "@typescript-eslint/parser",
"rules": {
Expand All @@ -14,7 +18,14 @@
"allowTypedFunctionExpressions": true
}
],
"no-console": ["error", {"allow": ["error"]}]
"no-console": ["error", {"allow": ["error"]}],
"@typescript-eslint/no-unused-vars": [
"warn",
{
// Ignore args that are underscore only
"argsIgnorePattern": "^_$"
}
]
}
},
{
Expand All @@ -35,8 +46,28 @@
"property": "only"
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
// Ignore args that are underscore only
"argsIgnorePattern": "^_$"
}
],
"@typescript-eslint/no-floating-promises": "warn"
}
},
{
"files": [
"dev/src/v1/**/*.ts",
"dev/src/v1beta1/**/*.ts",
"dev/test/gapic_firestore_v1.ts",
"dev/test/gapic_firestore_admin_v1.ts",
"dev/test/gapic_firestore_admin_v1.ts"
],
"rules": {
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-floating-promises": ["off"]
}
}
]
}
2 changes: 1 addition & 1 deletion .idea/runConfigurations/Unit_Tests.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions .readme-partials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,59 @@ introduction: |-
Applications that use Google's Server SDKs should not be used in end-user environments, such as on phones or on publicly hosted websites. If you are developing a Web or Node.js application that accesses Cloud Firestore on behalf of end users, use the firebase Client SDK.

**Note:** This Cloud Firestore Server SDK does not support Firestore databases created in [Datastore mode](https://cloud.google.com/datastore/docs/firestore-or-datastore#in_datastore_mode). To access these databases, use the [Datastore SDK](https://www.npmjs.com/package/@google-cloud/datastore).

body: |-

### Using the client library with Pipelines

```javascript

const {Firestore} = require('@google-cloud/firestore');

// Require/import Pipelines from '@google-cloud/firestore/pipelines'
const {field} = require('@google-cloud/firestore/pipelines');

// Create a new client
const firestore = new Firestore({
projectId: 'firestore-sdk-nightly',
databaseId: 'enterprise'
});

async function pipelinesQuickstart() {
// Obtain a collection reference.
const collection = firestore.collection('books');

// Enter new documents into the document.
await collection.add({
"title": "Whispers of the Cobalt Sea",
"price": 12.99,
"author": "Elara Vance",
"yearPublished": 2023
});
await collection.add({
"title": "The Antigravity Cat's Guide to Napping",
"price": 24.50,
"author": "Mittens the IV",
"yearPublished": 2026
});
console.log('Entered new documents into the collection.');

// Define a Pipeline query that selects books published this century,
// orders them by price, and computes a discounted price (20% off).
const pipeline = firestore.pipeline().collection('books')
.where(field('yearPublished').greaterThanOrEqual(2000))
.sort(field('price').ascending())
.select('title', 'author', field('price').multiply(0.8).as('discountedPrice'));

// Execute the pipeline
const pipelineSnapshot = await pipeline.execute();
console.log('Executed the Pipeline.');

console.log('Results:');
pipelineSnapshot.results.forEach(pipelineResult=> {
console.log(pipelineResult.data());
});
}
pipelinesQuickstart();

```
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,59 @@ quickstart();

```

### Using the client library with Pipelines

```javascript

const {Firestore} = require('@google-cloud/firestore');

// Require/import Pipelines from '@google-cloud/firestore/pipelines'
const {field} = require('@google-cloud/firestore/pipelines');

// Create a new client
const firestore = new Firestore({
projectId: 'firestore-sdk-nightly',
databaseId: 'enterprise'
});

async function pipelinesQuickstart() {
// Obtain a collection reference.
const collection = firestore.collection('books');

// Enter new documents into the document.
await collection.add({
"title": "Whispers of the Cobalt Sea",
"price": 12.99,
"author": "Elara Vance",
"yearPublished": 2023
});
await collection.add({
"title": "The Antigravity Cat's Guide to Napping",
"price": 24.50,
"author": "Mittens the IV",
"yearPublished": 2026
});
console.log('Entered new documents into the collection.');

// Define a Pipeline query that selects books published this century,
// orders them by price, and computes a discounted price (20% off).
const pipeline = firestore.pipeline().collection('books')
.where(field('yearPublished').greaterThanOrEqual(2000))
.sort(field('price').ascending())
.select('title', 'author', field('price').multiply(0.8).as('discountedPrice'));

// Execute the pipeline
const pipelineSnapshot = await pipeline.execute();
console.log('Executed the Pipeline.');

console.log('Results:');
pipelineSnapshot.results.forEach(pipelineResult=> {
console.log(pipelineResult.data());
});
}
pipelinesQuickstart();

```


## Samples
Expand All @@ -107,6 +160,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-firestore/t
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Limit-to-last-query | [source code](https://github.com/googleapis/nodejs-firestore/blob/main/samples/limit-to-last-query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-firestore&page=editor&open_in_editor=samples/limit-to-last-query.js,samples/README.md) |
| Pipelines-quickstart | [source code](https://github.com/googleapis/nodejs-firestore/blob/main/samples/pipelines-quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-firestore&page=editor&open_in_editor=samples/pipelines-quickstart.js,samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/nodejs-firestore/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-firestore&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Solution-counters | [source code](https://github.com/googleapis/nodejs-firestore/blob/main/samples/solution-counters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-firestore&page=editor&open_in_editor=samples/solution-counters.js,samples/README.md) |

Expand Down
Loading
Loading