Skip to content

startAfter and endBefore throw with no key argument when using REST #8487

Open
@tonyhallett

Description

Operating System

Windows 11

Environment (if applicable)

Version 128.0.6613.115 (Official Build) (64-bit)

Firebase SDK Version

^10.12.2

Firebase SDK Product(s)

Database

Project Tooling

React, typescript with Parcel

Detailed Problem Description

use constrainsts startAfter and endBefore without keys using REST.

"{ "error" : "Constraint key field must be a valid key name" } "

Due to the placeholders MAX_NAME and MIN_NAME being included in the generated url.
startAfter(2)
"http://127.0.0.1:9000/things.json?ns=mydb-default-rtdb&orderBy=%22pNumber%22&startAfter=2%2C%22%5BMAX_NAME%5D%22&format=export"

endBefore(2)
http://127.0.0.1:9000/things.json?ns=mydb-default-rtdb&orderBy=%22pNumber%22&endBefore=2%2C%22%5BMIN_NAME%5D%22&format=export

See

params = queryParamsStartAt(queryParams, indexValue, MAX_NAME);

params = queryParamsEndAt(queryParams, indexValue, MIN_NAME);

If being crawled will use REST

if (repo.forceRestClient_ || beingCrawled()) {

Steps and code to reproduce issue

//Links in problem description should suffice

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions