docs icon indicating copy to clipboard operation
docs copied to clipboard

📚 Documentation: Need to update the Queries section for Python users asap

Open akashgreninja opened this issue 1 year ago • 4 comments

💭 Description

I wanted to change the docs but I really couldn't run the phtml anyways if possible please make these changes in the docs

Query.startsWith("name", "Once upon a time")
Query.endsWith("name", "happily ever after.")

The above lines of code do not work with Python SDK when I went to the source file the snippets of code were

    @staticmethod
    def starts_with(attribute, value):
        return Query.add_query(attribute, "startsWith", value)

    @staticmethod
    def ends_with(attribute, value):
        return Query.add_query(attribute, "endsWith", value)

So I made the changes and my updated code was

Query.starts_with("name", "Once upon a time")
Query.ends_with("name", "happily ever after.")

But I'm still getting this error appwrite.exception.AppwriteException: Query method not valid: startsWith

Is this a bug ?

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

akashgreninja avatar May 27 '23 19:05 akashgreninja

@akashgreninja Thanks for pointing out the issue here. I'll make a PR to fix right now.

If you're getting Query method not valid: startsWith, I'm guessing your on Appwrite cloud... which is Appwrite 1.2.1, so this is a new feature in 1.3.

We're a little slow to update Cloud to 1.3, since we're in public beta. Sorry for the confusion!

gewenyu99 avatar May 31 '23 18:05 gewenyu99

Actually looking at this... we might need a while to fix this. There's a weird blocker. I'll keep you updated here.

gewenyu99 avatar May 31 '23 18:05 gewenyu99

HI @gewenyu99 , I can help with the issue as well, please let me know!

meenaljain0303 avatar Jun 20 '23 10:06 meenaljain0303

HI @gewenyu99 , I can help with the issue as well, please let me know!

There's some deeper issues behind this that we need to address. We're already working on this :)

gewenyu99 avatar Jun 20 '23 14:06 gewenyu99