Welcome to your first hands-on experience with Syncraft! This tutorial will guide you through the basics of writing and executing a query on our platform. In Syncraft, every query is structured with three fundamental elements: Root, Selection, and Query.
Let’s break down these elements:
Now, let's construct a simple query to retrieve user data:
Suppose we have a database of users and we want to fetch the details of the user with id
equal to 2.
"root": "Users"
"selection": {
"id": true,
"name": true,}
"query": {
"id": {
"eq": 2
}
}
Combining all the elements, our query looks like this:
{
"root": "Users",
"query": {
"id": {
"eq": 2
}
},
"selection": {
"id": true,
"name": true
}
}
Now, execute this query on the Syncraft platform. You'll receive a response with the details of the user with id
equal to 2.
Congratulations on writing and executing your first query! As you explore Syncraft further, you'll discover how to craft more complex queries to meet your data retrieval and processing needs. Happy querying!