Skip to content

fix: update sdk-for-go dependency to v3.1.0 and add bigint column support#21

Merged
levivannoort merged 3 commits into
mainfrom
appwrite-go-sdk-v3-1-0
May 11, 2026
Merged

fix: update sdk-for-go dependency to v3.1.0 and add bigint column support#21
levivannoort merged 3 commits into
mainfrom
appwrite-go-sdk-v3-1-0

Conversation

@levivannoort
Copy link
Copy Markdown
Member

@levivannoort levivannoort commented May 11, 2026

Summary

Updates sdk-for-go from v3.0.0 to v3.1.0 and adapts the provider to all SDK changes.

Breaking API changes fixed

  • CreateVariable (functions + sites): New required VariableId parameter added as 2nd argument — now passes id.Unique() to auto-generate IDs.
  • UpdateVariable (functions + sites): Key removed from positional parameters and moved to WithUpdateVariableKey() optional setter.

New feature: bigint column type

  • Added bigint as a supported column type for appwrite_tablesdb_column.
  • Supports min, max, default, and array options (same as integer).
  • Handles bigint in response normalization and state mapping.

Type of Change

  • Enhancement to existing resource

Checklist

  • make lint passes
  • make test passes
  • make docs has been run and changes committed
  • Acceptance tests added/updated (for resource changes)
  • Examples added/updated (for new resources/data sources)

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 11, 2026

Greptile Summary

This PR bumps sdk-for-go from v3.0.0 to v3.1.0 and adapts the provider to two breaking API changes (a new required VariableId parameter in CreateVariable, and Key moving to an option setter in UpdateVariable) for both the function and site resources. It also adds bigint as a new column type for appwrite_tablesdb_column, with full Create/Update/Read support and documentation.

  • SDK migration (function & site variable resources): id.Unique() is correctly passed as the new VariableId argument in CreateVariable, and WithUpdateVariableKey() replaces the old positional Key parameter in UpdateVariable — both resources are handled symmetrically.
  • BigInt column support: The new colTypeBigInt switch cases in Create and Update mirror the existing integer pattern closely; parseBigIntDefault adds proper error propagation (addressing a prior review concern) using strconv.ParseInt with 64-bit precision, though it currently returns int to match the SDK's own parameter types.

Confidence Score: 5/5

The changes are safe to merge; the SDK migration and bigint column addition are well-contained and follow existing patterns throughout the codebase.

The SDK breaking-change adaptations are mechanically correct and symmetric across function and site resources. The bigint implementation closely mirrors the integer column path, and parseBigIntDefault now surfaces parse errors rather than silently returning 0. No data-loss or incorrect-behavior paths were identified in the changed code.

No files require special attention; internal/services/column/resource.go and helpers.go have the most new logic but it is straightforward.

Important Files Changed

Filename Overview
internal/services/column/helpers.go Adds parseBigIntDefault with proper error propagation and 64-bit parsing; returns int to match SDK signature, which is safe on 64-bit hosts.
internal/services/column/resource.go Adds bigint column type support in Create/Update/Read; follows the same structural patterns as integer; min/max/default are correctly normalised in state.
internal/services/function/variable_resource.go Adapts to SDK v3.1.0: adds id.Unique() to CreateVariable and moves Key to WithUpdateVariableKey() option; changes look correct.
internal/services/site/variable_resource.go Same SDK v3.1.0 adaptation as function variable resource; symmetric and correct.
docs/resources/tablesdb_column.md Documentation updated to include bigint in type list and attribute descriptions; accurate.
go.mod Bumps sdk-for-go dependency from v3.0.0 to v3.1.0.

Reviews (2): Last reviewed commit: "fix: implement bigint parsing for defaul..." | Re-trigger Greptile

Comment thread internal/services/column/resource.go Outdated
@levivannoort levivannoort merged commit ced604c into main May 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants