Files
appwrite/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md
Jake Barnby ba401ea42e Update docs
2025-08-26 21:29:44 +12:00

27 lines
640 B
Markdown

package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/databases"
)
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
client.WithProject("<YOUR_PROJECT_ID>")
client.WithKey("<YOUR_API_KEY>")
)
service := databases.New(client)
response, error := service.CreateFloatAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",
"",
false,
databases.WithCreateFloatAttributeMin(0),
databases.WithCreateFloatAttributeMax(0),
databases.WithCreateFloatAttributeDefault(0),
databases.WithCreateFloatAttributeArray(false),
)