Sorry π comparison is not my goal
I just want to know if another method to create my table exist except admin panel
Yes, as said with appwrite functions
You can use any other server too with the server SDK if you want to create it externally
Also, you can create tables manually by connecting to MariaDB, but it's not recommended at all (that doesn't mean it's not possible)
Lastly, I have other question
I don't understand functions "How to Implement". Can you share a video link for function learning?
Yes
Also in any of the "modules" for example, databases, you can click the server tab and select your runtime/language and you will see the code that corresponds to functions and your language: https://appwrite.io/docs/server/databases
Same if you're going to use an independent server connected to appwrite. In other words, functions are basically server scripts
Let me take my laptop to send you a sample of that I want
Okay, perfect π
# TABLES
products:
id
name
quantity
sales:
id
date
amount
sale_items:
id
sale_id
product_id
quantity
I want function that reduce quantity of each product in the order on new order
// Create sale first
{
"date": "2023-09-01" ,
"amount": "100" ,
}
// Create sale items
[
{
"sale_id": 1 ,
"product_id": 1 ,
"quantity": 5 ,
},
{
"sale_id": 1 ,
"product_id": 3 ,
"quantity": 10 ,
},
]
I think that the response of that will help me to understand the logic of function
@D5
@LDs_Group I completely forgot about this. In the first place, sorry for the late response π
@LDs_Group What's your preferred language? JavaScript, Dart, PHP, Python Java...
DB ("Collections" in Appwrite) and Functions can be deployed to a new Appwrite project with the Appwrite CLI. You can pull the config of an existing project with $ appwrite init collection
and $ appwrite init function
, which will put it all into an appwrite.json
file. You can then use $ appwrite deploy collection
and $ appwrite deploy function
to push them to a new project.
Note that this does only pull over the structure of a db, not any of it's data.
In Appwrite v1.4, there's now export/import functionality, which allows you to move over data, as well
FYI, appwrite init function
will create new functions. it won't pull the function from appwrite
JavaScript or dart was well
It looks like ?:
"collection": "a_collection",
"columnA": "string",
"columnB": "integer"
It's ok now, I found solution myself after long time of test π¦ but it's ok π
[Solved] Bulk create project on AppWrite
Recommended threads
- Seed db
hello there... is this correct way to seed appwrite
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Appwriter Linux Key Bindings
Any tips for configuring appwriter for ubuntu? Actually the keybindings are tightly binded to either windows or mac. Working well on windows but in ubuntu some ...