Rank 3: Container
This is my code
Votes
0
Replies
23
Participants
Unknown
Messages
24
Rank 3: Container
This is my code
Rank 3: Container
While this is my error
Rank 3: Container
Rank 3: Container
I looked into the appwrite SDK code as well
The equal method is well defined, in it
yes, but you're not using it right
Rank 3: Container
thanks but I did refer that quite some times I cannot use this line
import { Client, Databases, Query } from "appwrite";
gives me a bunch of error on server side
but importing like this works
const sdk = require("node-appwrite");
But this does not seem to work
const query = sdk.Query()
So was trying to do it that way
well appwrite is the web sdk...given the docs, how do you think you'd do it with the node sdk?
Rank 3: Container
I tried doing with
Rank 3: Container
const sdk = require("node-appwrite");
const query = sdk.Query();
// Now while usingquery.equal(attribute, value);// this should have worked I guess```well that didn't work and that doesn't look like the docs, right?
Rank 3: Container
https://appwrite.io/docs/products/databases/databases
I was following this server sdk
Rank 3: Container
I will try doing
import { Client, Databases, Query } from "node-appwrite";
no, your import is fine
Rank 3: Container
I am sorry I am not able to catch the correction
Rank 3: Container
I guess it is in function calling maybe
Rank 3: Container
line
query.equal()
I mean
right, that's the incorrect part. does that look like what's in the docs?
Web Developer
sir please reply my message
Rank 3: Container
Thanks a lot @Steven It clicked me
Rank 3: Container
Instead of this now doing
const query = sdk.Query;query.equal();Now I can access the equal function correctly thanks a lot
Rank 3: Container
[SOLVED] Cannot Access Queries.equal() on server side
more specifically, it's just sdk.Query.equal(). the sdk.Query is the same as the Query in the web sdk. the big difference is just in how it's imported when doing import vs require. you can even do:
const sdk = require("node-appwrite");const { Client, Databases, Query } = sdk;that's how static functions are invoked. you don't need to instantiate an object