appwrite / docs

The official https://appwrite.io/docs documentation 📝
BSD 3-Clause "New" or "Revised" License
83 stars 118 forks source link

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

Open akashgreninja opened 1 year ago

akashgreninja commented 1 year ago

💭 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?

🏢 Have you read the Code of Conduct?

gewenyu99 commented 1 year ago

@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 commented 1 year ago

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

meenaljain0303 commented 1 year ago

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

gewenyu99 commented 1 year ago

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 :)