appwrite 26.1.0 → 28.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +42 -25
- data/lib/appwrite/enums/adapter.rb +1 -1
- data/lib/appwrite/enums/attribute_status.rb +1 -1
- data/lib/appwrite/enums/authentication_factor.rb +2 -1
- data/lib/appwrite/enums/authenticator_type.rb +1 -1
- data/lib/appwrite/enums/backup_services.rb +1 -1
- data/lib/appwrite/enums/billing_plan_group.rb +1 -1
- data/lib/appwrite/enums/browser.rb +1 -1
- data/lib/appwrite/enums/browser_permission.rb +1 -1
- data/lib/appwrite/enums/browser_theme.rb +1 -1
- data/lib/appwrite/enums/build_runtime.rb +3 -1
- data/lib/appwrite/enums/column_status.rb +1 -1
- data/lib/appwrite/enums/compression.rb +1 -1
- data/lib/appwrite/enums/credit_card.rb +1 -1
- data/lib/appwrite/enums/database_status.rb +1 -1
- data/lib/appwrite/enums/database_type.rb +1 -1
- data/lib/appwrite/enums/databases_index_type.rb +1 -1
- data/lib/appwrite/enums/deployment_download_type.rb +1 -1
- data/lib/appwrite/enums/deployment_status.rb +1 -1
- data/lib/appwrite/enums/documents_db_index_type.rb +9 -0
- data/lib/appwrite/enums/embedding_model.rb +8 -0
- data/lib/appwrite/enums/execution_method.rb +1 -1
- data/lib/appwrite/enums/execution_resource_type.rb +8 -0
- data/lib/appwrite/enums/execution_status.rb +1 -1
- data/lib/appwrite/enums/execution_trigger.rb +1 -1
- data/lib/appwrite/enums/flag.rb +1 -1
- data/lib/appwrite/enums/framework.rb +1 -1
- data/lib/appwrite/enums/image_format.rb +1 -1
- data/lib/appwrite/enums/image_gravity.rb +1 -1
- data/lib/appwrite/enums/index_status.rb +1 -1
- data/lib/appwrite/enums/invalidation_type.rb +9 -0
- data/lib/appwrite/enums/message_priority.rb +1 -1
- data/lib/appwrite/enums/message_status.rb +1 -1
- data/lib/appwrite/enums/messaging_provider_type.rb +1 -1
- data/lib/appwrite/enums/o_auth2_google_prompt.rb +1 -1
- data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +1 -1
- data/lib/appwrite/enums/o_auth_provider.rb +2 -1
- data/lib/appwrite/enums/order_by.rb +1 -1
- data/lib/appwrite/enums/organization_key_scopes.rb +1 -1
- data/lib/appwrite/enums/password_hash.rb +1 -1
- data/lib/appwrite/enums/platform_type.rb +1 -1
- data/lib/appwrite/enums/project_auth_method_id.rb +1 -1
- data/lib/appwrite/enums/project_email_template_id.rb +1 -1
- data/lib/appwrite/enums/project_email_template_locale.rb +1 -1
- data/lib/appwrite/enums/project_key_scopes.rb +16 -3
- data/lib/appwrite/enums/project_o_auth2_google_prompt.rb +1 -1
- data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +1 -1
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +2 -1
- data/lib/appwrite/enums/project_policy_id.rb +2 -1
- data/lib/appwrite/enums/project_protocol_id.rb +1 -1
- data/lib/appwrite/enums/project_service_id.rb +1 -1
- data/lib/appwrite/enums/project_smtp_secure.rb +1 -1
- data/lib/appwrite/enums/proxy_resource_type.rb +1 -1
- data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +1 -1
- data/lib/appwrite/enums/proxy_rule_status.rb +1 -1
- data/lib/appwrite/enums/region.rb +1 -1
- data/lib/appwrite/enums/relation_mutate.rb +1 -1
- data/lib/appwrite/enums/relationship_type.rb +1 -1
- data/lib/appwrite/enums/runtime.rb +3 -1
- data/lib/appwrite/enums/smtp_encryption.rb +1 -1
- data/lib/appwrite/enums/status_code.rb +1 -1
- data/lib/appwrite/enums/tables_db_index_type.rb +1 -1
- data/lib/appwrite/enums/template_reference_type.rb +1 -1
- data/lib/appwrite/enums/timezone.rb +1 -1
- data/lib/appwrite/enums/vcs_reference_type.rb +1 -1
- data/lib/appwrite/enums/vectors_db_index_type.rb +12 -0
- data/lib/appwrite/exception.rb +1 -1
- data/lib/appwrite/id.rb +3 -3
- data/lib/appwrite/input_file.rb +1 -1
- data/lib/appwrite/models/activity_event.rb +1 -1
- data/lib/appwrite/models/activity_event_list.rb +1 -1
- data/lib/appwrite/models/additional_resource.rb +1 -1
- data/lib/appwrite/models/algo_argon2.rb +1 -1
- data/lib/appwrite/models/algo_bcrypt.rb +1 -1
- data/lib/appwrite/models/algo_md5.rb +1 -1
- data/lib/appwrite/models/algo_phpass.rb +1 -1
- data/lib/appwrite/models/algo_scrypt.rb +1 -1
- data/lib/appwrite/models/algo_scrypt_modified.rb +1 -1
- data/lib/appwrite/models/algo_sha.rb +1 -1
- data/lib/appwrite/models/app.rb +1 -1
- data/lib/appwrite/models/app_installation.rb +2 -2
- data/lib/appwrite/models/app_installation_list.rb +1 -1
- data/lib/appwrite/models/app_key.rb +2 -2
- data/lib/appwrite/models/app_key_list.rb +1 -1
- data/lib/appwrite/models/app_scope.rb +1 -1
- data/lib/appwrite/models/app_scope_list.rb +1 -1
- data/lib/appwrite/models/app_secret.rb +2 -2
- data/lib/appwrite/models/app_secret_list.rb +1 -1
- data/lib/appwrite/models/app_secret_plaintext.rb +2 -2
- data/lib/appwrite/models/apps_list.rb +1 -1
- data/lib/appwrite/models/attribute_bigint.rb +5 -6
- data/lib/appwrite/models/attribute_boolean.rb +3 -4
- data/lib/appwrite/models/attribute_datetime.rb +3 -4
- data/lib/appwrite/models/attribute_email.rb +3 -4
- data/lib/appwrite/models/attribute_enum.rb +3 -4
- data/lib/appwrite/models/attribute_float.rb +5 -6
- data/lib/appwrite/models/attribute_integer.rb +5 -6
- data/lib/appwrite/models/attribute_ip.rb +3 -4
- data/lib/appwrite/models/attribute_line.rb +3 -4
- data/lib/appwrite/models/attribute_list.rb +1 -1
- data/lib/appwrite/models/attribute_longtext.rb +4 -5
- data/lib/appwrite/models/attribute_mediumtext.rb +4 -5
- data/lib/appwrite/models/attribute_object.rb +80 -0
- data/lib/appwrite/models/attribute_point.rb +3 -4
- data/lib/appwrite/models/attribute_polygon.rb +3 -4
- data/lib/appwrite/models/attribute_relationship.rb +2 -3
- data/lib/appwrite/models/attribute_string.rb +4 -5
- data/lib/appwrite/models/attribute_text.rb +4 -5
- data/lib/appwrite/models/attribute_url.rb +3 -4
- data/lib/appwrite/models/attribute_varchar.rb +4 -5
- data/lib/appwrite/models/attribute_vector.rb +85 -0
- data/lib/appwrite/models/backup_archive.rb +3 -3
- data/lib/appwrite/models/backup_archive_list.rb +1 -1
- data/lib/appwrite/models/backup_policy.rb +3 -3
- data/lib/appwrite/models/backup_policy_list.rb +1 -1
- data/lib/appwrite/models/backup_restoration.rb +1 -1
- data/lib/appwrite/models/backup_restoration_list.rb +1 -1
- data/lib/appwrite/models/billing_limits.rb +9 -9
- data/lib/appwrite/models/billing_plan.rb +15 -6
- data/lib/appwrite/models/billing_plan_addon.rb +5 -5
- data/lib/appwrite/models/billing_plan_addon_details.rb +1 -1
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +20 -20
- data/lib/appwrite/models/billing_plan_limits.rb +3 -3
- data/lib/appwrite/models/billing_plan_supported_addons.rb +1 -1
- data/lib/appwrite/models/block.rb +3 -3
- data/lib/appwrite/models/bucket.rb +1 -1
- data/lib/appwrite/models/bucket_list.rb +1 -1
- data/lib/appwrite/models/collection.rb +1 -1
- data/lib/appwrite/models/collection_list.rb +1 -1
- data/lib/appwrite/models/column_bigint.rb +5 -6
- data/lib/appwrite/models/column_boolean.rb +3 -4
- data/lib/appwrite/models/column_datetime.rb +3 -4
- data/lib/appwrite/models/column_email.rb +3 -4
- data/lib/appwrite/models/column_enum.rb +3 -4
- data/lib/appwrite/models/column_float.rb +5 -6
- data/lib/appwrite/models/column_index.rb +2 -2
- data/lib/appwrite/models/column_index_list.rb +1 -1
- data/lib/appwrite/models/column_integer.rb +5 -6
- data/lib/appwrite/models/column_ip.rb +3 -4
- data/lib/appwrite/models/column_line.rb +3 -4
- data/lib/appwrite/models/column_list.rb +1 -1
- data/lib/appwrite/models/column_longtext.rb +4 -5
- data/lib/appwrite/models/column_mediumtext.rb +4 -5
- data/lib/appwrite/models/column_point.rb +3 -4
- data/lib/appwrite/models/column_polygon.rb +3 -4
- data/lib/appwrite/models/column_relationship.rb +2 -3
- data/lib/appwrite/models/column_string.rb +4 -5
- data/lib/appwrite/models/column_text.rb +4 -5
- data/lib/appwrite/models/column_url.rb +3 -4
- data/lib/appwrite/models/column_varchar.rb +4 -5
- data/lib/appwrite/models/continent.rb +1 -1
- data/lib/appwrite/models/continent_list.rb +1 -1
- data/lib/appwrite/models/country.rb +1 -1
- data/lib/appwrite/models/country_list.rb +1 -1
- data/lib/appwrite/models/currency.rb +1 -1
- data/lib/appwrite/models/currency_list.rb +1 -1
- data/lib/appwrite/models/database.rb +22 -8
- data/lib/appwrite/models/database_list.rb +1 -1
- data/lib/appwrite/models/database_migration.rb +107 -0
- data/lib/appwrite/models/database_migration_list.rb +32 -0
- data/lib/appwrite/models/database_status.rb +31 -1
- data/lib/appwrite/models/database_status_connections.rb +1 -1
- data/lib/appwrite/models/database_status_replica.rb +7 -2
- data/lib/appwrite/models/database_status_volume.rb +1 -1
- data/lib/appwrite/models/dedicated_database.rb +3 -8
- data/lib/appwrite/models/dedicated_database_backup.rb +107 -0
- data/lib/appwrite/models/dedicated_database_backup_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_backup_storage.rb +47 -0
- data/lib/appwrite/models/dedicated_database_branch.rb +82 -0
- data/lib/appwrite/models/dedicated_database_branch_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_execution.rb +52 -0
- data/lib/appwrite/models/dedicated_database_execution_column.rb +32 -0
- data/lib/appwrite/models/dedicated_database_extensions.rb +37 -0
- data/lib/appwrite/models/dedicated_database_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_member.rb +6 -1
- data/lib/appwrite/models/dedicated_database_operation.rb +77 -0
- data/lib/appwrite/models/dedicated_database_operation_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_pitr_windows.rb +32 -0
- data/lib/appwrite/models/dedicated_database_pooler.rb +72 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +26 -1
- data/lib/appwrite/models/dedicated_database_restoration.rb +82 -0
- data/lib/appwrite/models/dedicated_database_restoration_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +1 -1
- data/lib/appwrite/models/dedicated_database_specification_list.rb +1 -1
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +1 -6
- data/lib/appwrite/models/deployment.rb +1 -2
- data/lib/appwrite/models/deployment_list.rb +1 -1
- data/lib/appwrite/models/dev_key.rb +1 -1
- data/lib/appwrite/models/document.rb +1 -1
- data/lib/appwrite/models/document_list.rb +1 -1
- data/lib/appwrite/models/email_template.rb +1 -1
- data/lib/appwrite/models/email_template_list.rb +1 -1
- data/lib/appwrite/models/embedding.rb +42 -0
- data/lib/appwrite/models/embedding_list.rb +32 -0
- data/lib/appwrite/models/ephemeral_key.rb +1 -1
- data/lib/appwrite/models/execution.rb +25 -8
- data/lib/appwrite/models/execution_list.rb +1 -1
- data/lib/appwrite/models/file.rb +11 -1
- data/lib/appwrite/models/file_list.rb +1 -1
- data/lib/appwrite/models/framework.rb +1 -1
- data/lib/appwrite/models/framework_adapter.rb +1 -1
- data/lib/appwrite/models/framework_list.rb +1 -1
- data/lib/appwrite/models/function.rb +1 -1
- data/lib/appwrite/models/function_list.rb +1 -1
- data/lib/appwrite/models/headers.rb +1 -1
- data/lib/appwrite/models/identity.rb +1 -1
- data/lib/appwrite/models/identity_list.rb +1 -1
- data/lib/appwrite/models/index.rb +2 -3
- data/lib/appwrite/models/index_list.rb +1 -1
- data/lib/appwrite/models/insight.rb +4 -4
- data/lib/appwrite/models/insight_cta.rb +1 -1
- data/lib/appwrite/models/insight_list.rb +1 -1
- data/lib/appwrite/models/jwt.rb +1 -1
- data/lib/appwrite/models/key.rb +1 -1
- data/lib/appwrite/models/key_list.rb +1 -1
- data/lib/appwrite/models/language.rb +1 -1
- data/lib/appwrite/models/language_list.rb +1 -1
- data/lib/appwrite/models/locale.rb +12 -12
- data/lib/appwrite/models/locale_code.rb +1 -1
- data/lib/appwrite/models/locale_code_list.rb +1 -1
- data/lib/appwrite/models/log.rb +1 -1
- data/lib/appwrite/models/log_list.rb +1 -1
- data/lib/appwrite/models/membership.rb +1 -1
- data/lib/appwrite/models/membership_list.rb +1 -1
- data/lib/appwrite/models/message.rb +4 -5
- data/lib/appwrite/models/message_list.rb +1 -1
- data/lib/appwrite/models/mfa_challenge.rb +1 -1
- data/lib/appwrite/models/mfa_challenge_secret.rb +47 -0
- data/lib/appwrite/models/mfa_factors.rb +9 -4
- data/lib/appwrite/models/mfa_recovery_codes.rb +1 -1
- data/lib/appwrite/models/mfa_type.rb +1 -1
- data/lib/appwrite/models/mock_number.rb +1 -1
- data/lib/appwrite/models/mock_number_list.rb +1 -1
- data/lib/appwrite/models/o_auth2_amazon.rb +1 -1
- data/lib/appwrite/models/o_auth2_apple.rb +1 -1
- data/lib/appwrite/models/o_auth2_appwrite.rb +1 -1
- data/lib/appwrite/models/o_auth2_auth0.rb +1 -1
- data/lib/appwrite/models/o_auth2_authentik.rb +1 -1
- data/lib/appwrite/models/o_auth2_autodesk.rb +1 -1
- data/lib/appwrite/models/o_auth2_bitbucket.rb +1 -1
- data/lib/appwrite/models/o_auth2_bitly.rb +1 -1
- data/lib/appwrite/models/o_auth2_box.rb +1 -1
- data/lib/appwrite/models/o_auth2_dailymotion.rb +1 -1
- data/lib/appwrite/models/o_auth2_discord.rb +1 -1
- data/lib/appwrite/models/o_auth2_disqus.rb +1 -1
- data/lib/appwrite/models/o_auth2_dropbox.rb +1 -1
- data/lib/appwrite/models/o_auth2_etsy.rb +1 -1
- data/lib/appwrite/models/o_auth2_facebook.rb +1 -1
- data/lib/appwrite/models/o_auth2_figma.rb +1 -1
- data/lib/appwrite/models/o_auth2_fusion_auth.rb +1 -1
- data/lib/appwrite/models/o_auth2_github.rb +1 -1
- data/lib/appwrite/models/o_auth2_gitlab.rb +1 -1
- data/lib/appwrite/models/o_auth2_google.rb +18 -2
- data/lib/appwrite/models/o_auth2_hugging_face.rb +42 -0
- data/lib/appwrite/models/o_auth2_keycloak.rb +1 -1
- data/lib/appwrite/models/o_auth2_kick.rb +1 -1
- data/lib/appwrite/models/o_auth2_linkedin.rb +1 -1
- data/lib/appwrite/models/o_auth2_microsoft.rb +1 -1
- data/lib/appwrite/models/o_auth2_notion.rb +1 -1
- data/lib/appwrite/models/o_auth2_oidc.rb +20 -3
- data/lib/appwrite/models/o_auth2_okta.rb +1 -1
- data/lib/appwrite/models/o_auth2_paypal.rb +1 -1
- data/lib/appwrite/models/o_auth2_podio.rb +1 -1
- data/lib/appwrite/models/o_auth2_provider_list.rb +1 -1
- data/lib/appwrite/models/o_auth2_salesforce.rb +1 -1
- data/lib/appwrite/models/o_auth2_slack.rb +1 -1
- data/lib/appwrite/models/o_auth2_spotify.rb +1 -1
- data/lib/appwrite/models/o_auth2_stripe.rb +1 -1
- data/lib/appwrite/models/o_auth2_tradeshift.rb +1 -1
- data/lib/appwrite/models/o_auth2_twitch.rb +1 -1
- data/lib/appwrite/models/o_auth2_word_press.rb +1 -1
- data/lib/appwrite/models/o_auth2_x.rb +1 -1
- data/lib/appwrite/models/o_auth2_yahoo.rb +1 -1
- data/lib/appwrite/models/o_auth2_yandex.rb +1 -1
- data/lib/appwrite/models/o_auth2_zoho.rb +1 -1
- data/lib/appwrite/models/o_auth2_zoom.rb +1 -1
- data/lib/appwrite/models/oauth2_approve.rb +1 -1
- data/lib/appwrite/models/oauth2_authorize.rb +1 -1
- data/lib/appwrite/models/oauth2_consent.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_list.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_token.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_token_list.rb +1 -1
- data/lib/appwrite/models/oauth2_device_authorization.rb +1 -1
- data/lib/appwrite/models/oauth2_grant.rb +1 -1
- data/lib/appwrite/models/oauth2_organization.rb +1 -1
- data/lib/appwrite/models/oauth2_organization_list.rb +1 -1
- data/lib/appwrite/models/oauth2_par.rb +1 -1
- data/lib/appwrite/models/oauth2_project.rb +1 -1
- data/lib/appwrite/models/oauth2_project_list.rb +1 -1
- data/lib/appwrite/models/oauth2_reject.rb +1 -1
- data/lib/appwrite/models/oauth2_token.rb +3 -3
- data/lib/appwrite/models/organization.rb +2 -2
- data/lib/appwrite/models/phone.rb +1 -1
- data/lib/appwrite/models/phone_list.rb +1 -1
- data/lib/appwrite/models/platform_android.rb +1 -2
- data/lib/appwrite/models/platform_apple.rb +1 -2
- data/lib/appwrite/models/platform_linux.rb +1 -2
- data/lib/appwrite/models/platform_list.rb +1 -1
- data/lib/appwrite/models/platform_web.rb +1 -2
- data/lib/appwrite/models/platform_windows.rb +1 -2
- data/lib/appwrite/models/policy_deny_aliased_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_corporate_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_disposable_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_free_email.rb +1 -1
- data/lib/appwrite/models/policy_list.rb +1 -1
- data/lib/appwrite/models/policy_membership_privacy.rb +1 -1
- data/lib/appwrite/models/policy_mfa_factors.rb +47 -0
- data/lib/appwrite/models/policy_password_dictionary.rb +1 -1
- data/lib/appwrite/models/policy_password_history.rb +1 -1
- data/lib/appwrite/models/policy_password_personal_data.rb +1 -1
- data/lib/appwrite/models/policy_password_strength.rb +1 -1
- data/lib/appwrite/models/policy_session_alert.rb +1 -1
- data/lib/appwrite/models/policy_session_duration.rb +1 -1
- data/lib/appwrite/models/policy_session_invalidation.rb +1 -1
- data/lib/appwrite/models/policy_session_limit.rb +1 -1
- data/lib/appwrite/models/policy_user_limit.rb +1 -1
- data/lib/appwrite/models/postgres_extension.rb +42 -0
- data/lib/appwrite/models/preferences.rb +1 -1
- data/lib/appwrite/models/presence.rb +4 -4
- data/lib/appwrite/models/presence_list.rb +1 -1
- data/lib/appwrite/models/program.rb +1 -1
- data/lib/appwrite/models/project.rb +23 -18
- data/lib/appwrite/models/project_auth_method.rb +1 -2
- data/lib/appwrite/models/project_list.rb +1 -1
- data/lib/appwrite/models/project_protocol.rb +1 -2
- data/lib/appwrite/models/project_service.rb +1 -2
- data/lib/appwrite/models/provider.rb +2 -2
- data/lib/appwrite/models/provider_list.rb +1 -1
- data/lib/appwrite/models/proxy_invalidation.rb +42 -0
- data/lib/appwrite/models/proxy_rule.rb +2 -3
- data/lib/appwrite/models/proxy_rule_list.rb +1 -1
- data/lib/appwrite/models/report.rb +2 -2
- data/lib/appwrite/models/report_list.rb +1 -1
- data/lib/appwrite/models/resource_token.rb +1 -1
- data/lib/appwrite/models/resource_token_list.rb +1 -1
- data/lib/appwrite/models/row.rb +1 -1
- data/lib/appwrite/models/row_list.rb +1 -1
- data/lib/appwrite/models/runtime.rb +1 -1
- data/lib/appwrite/models/runtime_list.rb +1 -1
- data/lib/appwrite/models/session.rb +1 -1
- data/lib/appwrite/models/session_list.rb +1 -1
- data/lib/appwrite/models/site.rb +6 -1
- data/lib/appwrite/models/site_list.rb +1 -1
- data/lib/appwrite/models/specification.rb +1 -1
- data/lib/appwrite/models/specification_list.rb +1 -1
- data/lib/appwrite/models/subscriber.rb +1 -1
- data/lib/appwrite/models/subscriber_list.rb +1 -1
- data/lib/appwrite/models/table.rb +1 -1
- data/lib/appwrite/models/table_list.rb +1 -1
- data/lib/appwrite/models/target.rb +2 -2
- data/lib/appwrite/models/target_list.rb +1 -1
- data/lib/appwrite/models/team.rb +1 -1
- data/lib/appwrite/models/team_list.rb +1 -1
- data/lib/appwrite/models/token.rb +1 -1
- data/lib/appwrite/models/topic.rb +1 -1
- data/lib/appwrite/models/topic_list.rb +1 -1
- data/lib/appwrite/models/transaction.rb +1 -1
- data/lib/appwrite/models/transaction_list.rb +1 -1
- data/lib/appwrite/models/usage_billing_plan.rb +7 -7
- data/lib/appwrite/models/user.rb +11 -11
- data/lib/appwrite/models/user_list.rb +1 -1
- data/lib/appwrite/models/variable.rb +1 -1
- data/lib/appwrite/models/variable_list.rb +1 -1
- data/lib/appwrite/models/vectorsdb_collection.rb +87 -0
- data/lib/appwrite/models/vectorsdb_collection_list.rb +32 -0
- data/lib/appwrite/models/webhook.rb +1 -1
- data/lib/appwrite/models/webhook_list.rb +1 -1
- data/lib/appwrite/operator.rb +6 -0
- data/lib/appwrite/permission.rb +4 -0
- data/lib/appwrite/query.rb +4 -4
- data/lib/appwrite/role.rb +12 -14
- data/lib/appwrite/service.rb +1 -1
- data/lib/appwrite/services/account.rb +329 -322
- data/lib/appwrite/services/activities.rb +14 -15
- data/lib/appwrite/services/advisor.rb +41 -37
- data/lib/appwrite/services/apps.rb +228 -131
- data/lib/appwrite/services/avatars.rb +156 -55
- data/lib/appwrite/services/backups.rb +113 -88
- data/lib/appwrite/services/databases.rb +875 -516
- data/lib/appwrite/services/documents_db.rb +1683 -0
- data/lib/appwrite/services/embeddings.rb +48 -0
- data/lib/appwrite/services/functions.rb +277 -173
- data/lib/appwrite/services/graphql.rb +12 -12
- data/lib/appwrite/services/locale.rb +19 -37
- data/lib/appwrite/services/messaging.rb +544 -259
- data/lib/appwrite/services/mongo.rb +1359 -0
- data/lib/appwrite/services/mysql.rb +1503 -0
- data/lib/appwrite/services/oauth2.rb +122 -53
- data/lib/appwrite/services/organization.rb +153 -123
- data/lib/appwrite/services/postgresql.rb +1615 -0
- data/lib/appwrite/services/presences.rb +49 -35
- data/lib/appwrite/services/project.rb +889 -580
- data/lib/appwrite/services/proxy.rb +111 -52
- data/lib/appwrite/services/sites.rb +270 -165
- data/lib/appwrite/services/storage.rb +153 -92
- data/lib/appwrite/services/tables_db.rb +1153 -534
- data/lib/appwrite/services/teams.rb +161 -122
- data/lib/appwrite/services/tokens.rb +38 -31
- data/lib/appwrite/services/users.rb +406 -266
- data/lib/appwrite/services/vectors_db.rb +1614 -0
- data/lib/appwrite/services/webhooks.rb +59 -40
- data/lib/appwrite.rb +39 -0
- metadata +43 -4
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#frozen_string_literal: true
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Appwrite
|
|
4
4
|
class TablesDB < Service
|
|
5
|
-
|
|
6
5
|
def initialize(client)
|
|
7
6
|
@client = client
|
|
8
7
|
end
|
|
@@ -15,7 +14,11 @@ module Appwrite
|
|
|
15
14
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
16
15
|
#
|
|
17
16
|
# @return [DatabaseList]
|
|
18
|
-
def list(
|
|
17
|
+
def list(
|
|
18
|
+
queries: nil,
|
|
19
|
+
search: nil,
|
|
20
|
+
total: nil
|
|
21
|
+
)
|
|
19
22
|
api_path = '/tablesdb'
|
|
20
23
|
|
|
21
24
|
api_params = {
|
|
@@ -23,7 +26,7 @@ module Appwrite
|
|
|
23
26
|
search: search,
|
|
24
27
|
total: total,
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
|
|
27
30
|
api_headers = {
|
|
28
31
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
29
32
|
"accept": 'application/json',
|
|
@@ -36,28 +39,35 @@ module Appwrite
|
|
|
36
39
|
params: api_params,
|
|
37
40
|
response_type: Models::DatabaseList
|
|
38
41
|
)
|
|
39
|
-
|
|
40
42
|
end
|
|
41
43
|
|
|
42
44
|
# Create a new Database.
|
|
43
|
-
#
|
|
44
45
|
#
|
|
45
|
-
#
|
|
46
|
+
#
|
|
47
|
+
# @param [String] database_id Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
46
48
|
# @param [String] name Database name. Max length: 128 chars.
|
|
47
|
-
# @param [] enabled Is the database enabled? When set to
|
|
49
|
+
# @param [] enabled Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
48
50
|
# @param [String] specification Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
|
|
49
51
|
# @param [Integer] replicas Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
|
|
52
|
+
# @param [String] sync_mode Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
50
53
|
#
|
|
51
54
|
# @return [Database]
|
|
52
|
-
def create(
|
|
55
|
+
def create(
|
|
56
|
+
database_id:,
|
|
57
|
+
name:,
|
|
58
|
+
enabled: nil,
|
|
59
|
+
specification: nil,
|
|
60
|
+
replicas: nil,
|
|
61
|
+
sync_mode: nil
|
|
62
|
+
)
|
|
53
63
|
api_path = '/tablesdb'
|
|
54
64
|
|
|
55
65
|
if database_id.nil?
|
|
56
|
-
|
|
66
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
57
67
|
end
|
|
58
68
|
|
|
59
69
|
if name.nil?
|
|
60
|
-
|
|
70
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
61
71
|
end
|
|
62
72
|
|
|
63
73
|
api_params = {
|
|
@@ -66,8 +76,9 @@ module Appwrite
|
|
|
66
76
|
enabled: enabled,
|
|
67
77
|
specification: specification,
|
|
68
78
|
replicas: replicas,
|
|
79
|
+
syncMode: sync_mode,
|
|
69
80
|
}
|
|
70
|
-
|
|
81
|
+
|
|
71
82
|
api_headers = {
|
|
72
83
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
73
84
|
"content-type": 'application/json',
|
|
@@ -81,7 +92,6 @@ module Appwrite
|
|
|
81
92
|
params: api_params,
|
|
82
93
|
response_type: Models::Database
|
|
83
94
|
)
|
|
84
|
-
|
|
85
95
|
end
|
|
86
96
|
|
|
87
97
|
# List the dedicated database specifications available on the current plan.
|
|
@@ -93,9 +103,8 @@ module Appwrite
|
|
|
93
103
|
def list_specifications()
|
|
94
104
|
api_path = '/tablesdb/specifications'
|
|
95
105
|
|
|
96
|
-
api_params = {
|
|
97
|
-
|
|
98
|
-
|
|
106
|
+
api_params = {}
|
|
107
|
+
|
|
99
108
|
api_headers = {
|
|
100
109
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
101
110
|
"accept": 'application/json',
|
|
@@ -108,7 +117,6 @@ module Appwrite
|
|
|
108
117
|
params: api_params,
|
|
109
118
|
response_type: Models::DedicatedDatabaseSpecificationList
|
|
110
119
|
)
|
|
111
|
-
|
|
112
120
|
end
|
|
113
121
|
|
|
114
122
|
# List transactions across all databases.
|
|
@@ -116,13 +124,15 @@ module Appwrite
|
|
|
116
124
|
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
|
|
117
125
|
#
|
|
118
126
|
# @return [TransactionList]
|
|
119
|
-
def list_transactions(
|
|
127
|
+
def list_transactions(
|
|
128
|
+
queries: nil
|
|
129
|
+
)
|
|
120
130
|
api_path = '/tablesdb/transactions'
|
|
121
131
|
|
|
122
132
|
api_params = {
|
|
123
133
|
queries: queries,
|
|
124
134
|
}
|
|
125
|
-
|
|
135
|
+
|
|
126
136
|
api_headers = {
|
|
127
137
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
128
138
|
"accept": 'application/json',
|
|
@@ -135,7 +145,6 @@ module Appwrite
|
|
|
135
145
|
params: api_params,
|
|
136
146
|
response_type: Models::TransactionList
|
|
137
147
|
)
|
|
138
|
-
|
|
139
148
|
end
|
|
140
149
|
|
|
141
150
|
# Create a new transaction.
|
|
@@ -143,13 +152,15 @@ module Appwrite
|
|
|
143
152
|
# @param [Integer] ttl Seconds before the transaction expires.
|
|
144
153
|
#
|
|
145
154
|
# @return [Transaction]
|
|
146
|
-
def create_transaction(
|
|
155
|
+
def create_transaction(
|
|
156
|
+
ttl: nil
|
|
157
|
+
)
|
|
147
158
|
api_path = '/tablesdb/transactions'
|
|
148
159
|
|
|
149
160
|
api_params = {
|
|
150
161
|
ttl: ttl,
|
|
151
162
|
}
|
|
152
|
-
|
|
163
|
+
|
|
153
164
|
api_headers = {
|
|
154
165
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
155
166
|
"content-type": 'application/json',
|
|
@@ -163,7 +174,6 @@ module Appwrite
|
|
|
163
174
|
params: api_params,
|
|
164
175
|
response_type: Models::Transaction
|
|
165
176
|
)
|
|
166
|
-
|
|
167
177
|
end
|
|
168
178
|
|
|
169
179
|
# Get a transaction by its unique ID.
|
|
@@ -171,17 +181,18 @@ module Appwrite
|
|
|
171
181
|
# @param [String] transaction_id Transaction ID.
|
|
172
182
|
#
|
|
173
183
|
# @return [Transaction]
|
|
174
|
-
def get_transaction(
|
|
184
|
+
def get_transaction(
|
|
185
|
+
transaction_id:
|
|
186
|
+
)
|
|
175
187
|
api_path = '/tablesdb/transactions/{transactionId}'
|
|
176
188
|
.gsub('{transactionId}', transaction_id)
|
|
177
189
|
|
|
178
190
|
if transaction_id.nil?
|
|
179
|
-
|
|
191
|
+
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
180
192
|
end
|
|
181
193
|
|
|
182
|
-
api_params = {
|
|
183
|
-
|
|
184
|
-
|
|
194
|
+
api_params = {}
|
|
195
|
+
|
|
185
196
|
api_headers = {
|
|
186
197
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
187
198
|
"accept": 'application/json',
|
|
@@ -194,7 +205,6 @@ module Appwrite
|
|
|
194
205
|
params: api_params,
|
|
195
206
|
response_type: Models::Transaction
|
|
196
207
|
)
|
|
197
|
-
|
|
198
208
|
end
|
|
199
209
|
|
|
200
210
|
# Update a transaction, to either commit or roll back its operations.
|
|
@@ -204,19 +214,23 @@ module Appwrite
|
|
|
204
214
|
# @param [] rollback Rollback transaction?
|
|
205
215
|
#
|
|
206
216
|
# @return [Transaction]
|
|
207
|
-
def update_transaction(
|
|
217
|
+
def update_transaction(
|
|
218
|
+
transaction_id:,
|
|
219
|
+
commit: nil,
|
|
220
|
+
rollback: nil
|
|
221
|
+
)
|
|
208
222
|
api_path = '/tablesdb/transactions/{transactionId}'
|
|
209
223
|
.gsub('{transactionId}', transaction_id)
|
|
210
224
|
|
|
211
225
|
if transaction_id.nil?
|
|
212
|
-
|
|
226
|
+
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
213
227
|
end
|
|
214
228
|
|
|
215
229
|
api_params = {
|
|
216
230
|
commit: commit,
|
|
217
231
|
rollback: rollback,
|
|
218
232
|
}
|
|
219
|
-
|
|
233
|
+
|
|
220
234
|
api_headers = {
|
|
221
235
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
222
236
|
"content-type": 'application/json',
|
|
@@ -230,7 +244,6 @@ module Appwrite
|
|
|
230
244
|
params: api_params,
|
|
231
245
|
response_type: Models::Transaction
|
|
232
246
|
)
|
|
233
|
-
|
|
234
247
|
end
|
|
235
248
|
|
|
236
249
|
# Delete a transaction by its unique ID.
|
|
@@ -238,17 +251,18 @@ module Appwrite
|
|
|
238
251
|
# @param [String] transaction_id Transaction ID.
|
|
239
252
|
#
|
|
240
253
|
# @return []
|
|
241
|
-
def delete_transaction(
|
|
254
|
+
def delete_transaction(
|
|
255
|
+
transaction_id:
|
|
256
|
+
)
|
|
242
257
|
api_path = '/tablesdb/transactions/{transactionId}'
|
|
243
258
|
.gsub('{transactionId}', transaction_id)
|
|
244
259
|
|
|
245
260
|
if transaction_id.nil?
|
|
246
|
-
|
|
261
|
+
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
247
262
|
end
|
|
248
263
|
|
|
249
|
-
api_params = {
|
|
250
|
-
|
|
251
|
-
|
|
264
|
+
api_params = {}
|
|
265
|
+
|
|
252
266
|
api_headers = {
|
|
253
267
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
254
268
|
"content-type": 'application/json',
|
|
@@ -260,7 +274,6 @@ module Appwrite
|
|
|
260
274
|
headers: api_headers,
|
|
261
275
|
params: api_params,
|
|
262
276
|
)
|
|
263
|
-
|
|
264
277
|
end
|
|
265
278
|
|
|
266
279
|
# Create multiple operations in a single transaction.
|
|
@@ -269,18 +282,21 @@ module Appwrite
|
|
|
269
282
|
# @param [Array] operations Array of staged operations.
|
|
270
283
|
#
|
|
271
284
|
# @return [Transaction]
|
|
272
|
-
def create_operations(
|
|
285
|
+
def create_operations(
|
|
286
|
+
transaction_id:,
|
|
287
|
+
operations: nil
|
|
288
|
+
)
|
|
273
289
|
api_path = '/tablesdb/transactions/{transactionId}/operations'
|
|
274
290
|
.gsub('{transactionId}', transaction_id)
|
|
275
291
|
|
|
276
292
|
if transaction_id.nil?
|
|
277
|
-
|
|
293
|
+
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
278
294
|
end
|
|
279
295
|
|
|
280
296
|
api_params = {
|
|
281
297
|
operations: operations,
|
|
282
298
|
}
|
|
283
|
-
|
|
299
|
+
|
|
284
300
|
api_headers = {
|
|
285
301
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
286
302
|
"content-type": 'application/json',
|
|
@@ -294,7 +310,6 @@ module Appwrite
|
|
|
294
310
|
params: api_params,
|
|
295
311
|
response_type: Models::Transaction
|
|
296
312
|
)
|
|
297
|
-
|
|
298
313
|
end
|
|
299
314
|
|
|
300
315
|
# Get a database by its unique ID. This endpoint response returns a JSON
|
|
@@ -303,17 +318,18 @@ module Appwrite
|
|
|
303
318
|
# @param [String] database_id Database ID.
|
|
304
319
|
#
|
|
305
320
|
# @return [Database]
|
|
306
|
-
def get(
|
|
321
|
+
def get(
|
|
322
|
+
database_id:
|
|
323
|
+
)
|
|
307
324
|
api_path = '/tablesdb/{databaseId}'
|
|
308
325
|
.gsub('{databaseId}', database_id)
|
|
309
326
|
|
|
310
327
|
if database_id.nil?
|
|
311
|
-
|
|
328
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
312
329
|
end
|
|
313
330
|
|
|
314
|
-
api_params = {
|
|
315
|
-
|
|
316
|
-
|
|
331
|
+
api_params = {}
|
|
332
|
+
|
|
317
333
|
api_headers = {
|
|
318
334
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
319
335
|
"accept": 'application/json',
|
|
@@ -326,31 +342,41 @@ module Appwrite
|
|
|
326
342
|
params: api_params,
|
|
327
343
|
response_type: Models::Database
|
|
328
344
|
)
|
|
329
|
-
|
|
330
345
|
end
|
|
331
346
|
|
|
332
347
|
# Update a database by its unique ID.
|
|
333
348
|
#
|
|
334
349
|
# @param [String] database_id Database ID.
|
|
335
350
|
# @param [String] name Database name. Max length: 128 chars.
|
|
336
|
-
# @param [] enabled Is database enabled? When set to
|
|
351
|
+
# @param [] enabled Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
352
|
+
# @param [String] specification Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
|
|
337
353
|
# @param [Integer] replicas Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
|
|
354
|
+
# @param [String] sync_mode Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
|
|
338
355
|
#
|
|
339
356
|
# @return [Database]
|
|
340
|
-
def update(
|
|
357
|
+
def update(
|
|
358
|
+
database_id:,
|
|
359
|
+
name: nil,
|
|
360
|
+
enabled: nil,
|
|
361
|
+
specification: nil,
|
|
362
|
+
replicas: nil,
|
|
363
|
+
sync_mode: nil
|
|
364
|
+
)
|
|
341
365
|
api_path = '/tablesdb/{databaseId}'
|
|
342
366
|
.gsub('{databaseId}', database_id)
|
|
343
367
|
|
|
344
368
|
if database_id.nil?
|
|
345
|
-
|
|
369
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
346
370
|
end
|
|
347
371
|
|
|
348
372
|
api_params = {
|
|
349
373
|
name: name,
|
|
350
374
|
enabled: enabled,
|
|
375
|
+
specification: specification,
|
|
351
376
|
replicas: replicas,
|
|
377
|
+
syncMode: sync_mode,
|
|
352
378
|
}
|
|
353
|
-
|
|
379
|
+
|
|
354
380
|
api_headers = {
|
|
355
381
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
356
382
|
"content-type": 'application/json',
|
|
@@ -364,7 +390,6 @@ module Appwrite
|
|
|
364
390
|
params: api_params,
|
|
365
391
|
response_type: Models::Database
|
|
366
392
|
)
|
|
367
|
-
|
|
368
393
|
end
|
|
369
394
|
|
|
370
395
|
# Delete a database by its unique ID. Only API keys with with databases.write
|
|
@@ -373,17 +398,18 @@ module Appwrite
|
|
|
373
398
|
# @param [String] database_id Database ID.
|
|
374
399
|
#
|
|
375
400
|
# @return []
|
|
376
|
-
def delete(
|
|
401
|
+
def delete(
|
|
402
|
+
database_id:
|
|
403
|
+
)
|
|
377
404
|
api_path = '/tablesdb/{databaseId}'
|
|
378
405
|
.gsub('{databaseId}', database_id)
|
|
379
406
|
|
|
380
407
|
if database_id.nil?
|
|
381
|
-
|
|
408
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
382
409
|
end
|
|
383
410
|
|
|
384
|
-
api_params = {
|
|
385
|
-
|
|
386
|
-
|
|
411
|
+
api_params = {}
|
|
412
|
+
|
|
387
413
|
api_headers = {
|
|
388
414
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
389
415
|
"content-type": 'application/json',
|
|
@@ -395,29 +421,37 @@ module Appwrite
|
|
|
395
421
|
headers: api_headers,
|
|
396
422
|
params: api_params,
|
|
397
423
|
)
|
|
398
|
-
|
|
399
424
|
end
|
|
400
425
|
|
|
401
426
|
# Trigger a manual failover for a dedicated database with high availability
|
|
402
427
|
# enabled. Promotes a replica to primary. The failover runs asynchronously;
|
|
403
|
-
# poll the database document for status updates.
|
|
428
|
+
# poll the database document for status updates. A database left
|
|
429
|
+
# mid-operation also accepts this call as a repair once nothing is driving
|
|
430
|
+
# the operation it is stuck in. Repairing a failover that did not finish, a
|
|
431
|
+
# `failed` database, a stranded upgrade or migrate, or a stranded compute
|
|
432
|
+
# resize additionally requires `targetReplicaId` to name the member to
|
|
433
|
+
# promote, because the default target may be the member that operation
|
|
434
|
+
# already promoted.
|
|
404
435
|
#
|
|
405
436
|
# @param [String] database_id Database ID.
|
|
406
437
|
# @param [String] target_replica_id Target replica ID to promote. If not specified, the healthiest replica is selected.
|
|
407
438
|
#
|
|
408
439
|
# @return [DedicatedDatabase]
|
|
409
|
-
def create_failover(
|
|
440
|
+
def create_failover(
|
|
441
|
+
database_id:,
|
|
442
|
+
target_replica_id: nil
|
|
443
|
+
)
|
|
410
444
|
api_path = '/tablesdb/{databaseId}/failovers'
|
|
411
445
|
.gsub('{databaseId}', database_id)
|
|
412
446
|
|
|
413
447
|
if database_id.nil?
|
|
414
|
-
|
|
448
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
415
449
|
end
|
|
416
450
|
|
|
417
451
|
api_params = {
|
|
418
452
|
targetReplicaId: target_replica_id,
|
|
419
453
|
}
|
|
420
|
-
|
|
454
|
+
|
|
421
455
|
api_headers = {
|
|
422
456
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
423
457
|
"content-type": 'application/json',
|
|
@@ -431,7 +465,248 @@ module Appwrite
|
|
|
431
465
|
params: api_params,
|
|
432
466
|
response_type: Models::DedicatedDatabase
|
|
433
467
|
)
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# List the dedicated migrations for a TablesDB database. A database has at
|
|
471
|
+
# most one in-flight migration.
|
|
472
|
+
#
|
|
473
|
+
# @param [String] database_id Database ID.
|
|
474
|
+
#
|
|
475
|
+
# @return [DatabaseMigrationList]
|
|
476
|
+
def list_migrations(
|
|
477
|
+
database_id:
|
|
478
|
+
)
|
|
479
|
+
api_path = '/tablesdb/{databaseId}/migrations'
|
|
480
|
+
.gsub('{databaseId}', database_id)
|
|
481
|
+
|
|
482
|
+
if database_id.nil?
|
|
483
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
api_params = {}
|
|
487
|
+
|
|
488
|
+
api_headers = {
|
|
489
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
490
|
+
"accept": 'application/json',
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
@client.call(
|
|
494
|
+
method: 'GET',
|
|
495
|
+
path: api_path,
|
|
496
|
+
headers: api_headers,
|
|
497
|
+
params: api_params,
|
|
498
|
+
response_type: Models::DatabaseMigrationList
|
|
499
|
+
)
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
# Start migrating a serverless TablesDB database onto a dedicated MySQL
|
|
503
|
+
# compute. Data is copied to the target while the source stays live, with a
|
|
504
|
+
# brief read-only window during cutover.
|
|
505
|
+
#
|
|
506
|
+
# @param [String] database_id Database ID.
|
|
507
|
+
# @param [String] specification Dedicated compute specification to provision as the migration target (e.g. s-2vcpu-4gb). The migration always targets a dedicated compute, so `serverless` is not accepted.
|
|
508
|
+
# @param [] auto_cutover Whether to cut over automatically once the copy is verified. When disabled the migration parks at ready_to_cutover and holds there until the cutover is performed manually.
|
|
509
|
+
#
|
|
510
|
+
# @return [DatabaseMigration]
|
|
511
|
+
def create_migration(
|
|
512
|
+
database_id:,
|
|
513
|
+
specification:,
|
|
514
|
+
auto_cutover: nil
|
|
515
|
+
)
|
|
516
|
+
api_path = '/tablesdb/{databaseId}/migrations'
|
|
517
|
+
.gsub('{databaseId}', database_id)
|
|
518
|
+
|
|
519
|
+
if database_id.nil?
|
|
520
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
if specification.nil?
|
|
524
|
+
raise Appwrite::Exception.new('Missing required parameter: "specification"')
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
api_params = {
|
|
528
|
+
specification: specification,
|
|
529
|
+
autoCutover: auto_cutover,
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
api_headers = {
|
|
533
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
534
|
+
"content-type": 'application/json',
|
|
535
|
+
"accept": 'application/json',
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
@client.call(
|
|
539
|
+
method: 'POST',
|
|
540
|
+
path: api_path,
|
|
541
|
+
headers: api_headers,
|
|
542
|
+
params: api_params,
|
|
543
|
+
response_type: Models::DatabaseMigration
|
|
544
|
+
)
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
# Get a single dedicated migration for a TablesDB database by its ID.
|
|
548
|
+
#
|
|
549
|
+
# @param [String] database_id Database ID.
|
|
550
|
+
# @param [String] migration_id Migration ID.
|
|
551
|
+
#
|
|
552
|
+
# @return [DatabaseMigration]
|
|
553
|
+
def get_migration(
|
|
554
|
+
database_id:,
|
|
555
|
+
migration_id:
|
|
556
|
+
)
|
|
557
|
+
api_path = '/tablesdb/{databaseId}/migrations/{migrationId}'
|
|
558
|
+
.gsub('{databaseId}', database_id)
|
|
559
|
+
.gsub('{migrationId}', migration_id)
|
|
560
|
+
|
|
561
|
+
if database_id.nil?
|
|
562
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
if migration_id.nil?
|
|
566
|
+
raise Appwrite::Exception.new('Missing required parameter: "migrationId"')
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
api_params = {}
|
|
570
|
+
|
|
571
|
+
api_headers = {
|
|
572
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
573
|
+
"accept": 'application/json',
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
@client.call(
|
|
577
|
+
method: 'GET',
|
|
578
|
+
path: api_path,
|
|
579
|
+
headers: api_headers,
|
|
580
|
+
params: api_params,
|
|
581
|
+
response_type: Models::DatabaseMigration
|
|
582
|
+
)
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
# Abort an in-flight TablesDB dedicated migration. Only allowed before
|
|
586
|
+
# cutover; once the migration has cut over it cannot be aborted.
|
|
587
|
+
#
|
|
588
|
+
# @param [String] database_id Database ID.
|
|
589
|
+
# @param [String] migration_id Migration ID.
|
|
590
|
+
#
|
|
591
|
+
# @return []
|
|
592
|
+
def delete_migration(
|
|
593
|
+
database_id:,
|
|
594
|
+
migration_id:
|
|
595
|
+
)
|
|
596
|
+
api_path = '/tablesdb/{databaseId}/migrations/{migrationId}'
|
|
597
|
+
.gsub('{databaseId}', database_id)
|
|
598
|
+
.gsub('{migrationId}', migration_id)
|
|
599
|
+
|
|
600
|
+
if database_id.nil?
|
|
601
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
602
|
+
end
|
|
603
|
+
|
|
604
|
+
if migration_id.nil?
|
|
605
|
+
raise Appwrite::Exception.new('Missing required parameter: "migrationId"')
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
api_params = {}
|
|
609
|
+
|
|
610
|
+
api_headers = {
|
|
611
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
612
|
+
"content-type": 'application/json',
|
|
613
|
+
"accept": 'application/json',
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
@client.call(
|
|
617
|
+
method: 'DELETE',
|
|
618
|
+
path: api_path,
|
|
619
|
+
headers: api_headers,
|
|
620
|
+
params: api_params,
|
|
621
|
+
)
|
|
622
|
+
end
|
|
623
|
+
|
|
624
|
+
# Cut a verified TablesDB migration over to its dedicated compute. Only
|
|
625
|
+
# applies to a migration created with `autoCutover` disabled, which waits at
|
|
626
|
+
# `ready_to_cutover` until this is called. The routing flip happens shortly
|
|
627
|
+
# after this returns, with a brief read-only window. One call buys one
|
|
628
|
+
# attempt: a cutover that fails a check returns the migration to `verifying`
|
|
629
|
+
# and parks it again, so call this once more to retry.
|
|
630
|
+
#
|
|
631
|
+
# @param [String] database_id Database ID.
|
|
632
|
+
# @param [String] migration_id Migration ID.
|
|
633
|
+
#
|
|
634
|
+
# @return [DatabaseMigration]
|
|
635
|
+
def cutover_migration(
|
|
636
|
+
database_id:,
|
|
637
|
+
migration_id:
|
|
638
|
+
)
|
|
639
|
+
api_path = '/tablesdb/{databaseId}/migrations/{migrationId}/cutover'
|
|
640
|
+
.gsub('{databaseId}', database_id)
|
|
641
|
+
.gsub('{migrationId}', migration_id)
|
|
642
|
+
|
|
643
|
+
if database_id.nil?
|
|
644
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
if migration_id.nil?
|
|
648
|
+
raise Appwrite::Exception.new('Missing required parameter: "migrationId"')
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
api_params = {}
|
|
652
|
+
|
|
653
|
+
api_headers = {
|
|
654
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
655
|
+
"content-type": 'application/json',
|
|
656
|
+
"accept": 'application/json',
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
@client.call(
|
|
660
|
+
method: 'POST',
|
|
661
|
+
path: api_path,
|
|
662
|
+
headers: api_headers,
|
|
663
|
+
params: api_params,
|
|
664
|
+
response_type: Models::DatabaseMigration
|
|
665
|
+
)
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
# List the lifecycle operations recorded for a dedicated database, newest
|
|
669
|
+
# first. Every provision, update, restore, backup and replication action is
|
|
670
|
+
# recorded here with its outcome, including an attempt that was abandoned
|
|
671
|
+
# because another worker took over the database.
|
|
672
|
+
#
|
|
673
|
+
# @param [String] database_id Database ID.
|
|
674
|
+
# @param [String] status Filter by operation status.
|
|
675
|
+
# @param [Integer] limit Maximum number of operations to return.
|
|
676
|
+
# @param [Integer] offset Number of operations to skip.
|
|
677
|
+
#
|
|
678
|
+
# @return [DedicatedDatabaseOperationList]
|
|
679
|
+
def list_operations(
|
|
680
|
+
database_id:,
|
|
681
|
+
status: nil,
|
|
682
|
+
limit: nil,
|
|
683
|
+
offset: nil
|
|
684
|
+
)
|
|
685
|
+
api_path = '/tablesdb/{databaseId}/operations'
|
|
686
|
+
.gsub('{databaseId}', database_id)
|
|
687
|
+
|
|
688
|
+
if database_id.nil?
|
|
689
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
690
|
+
end
|
|
691
|
+
|
|
692
|
+
api_params = {
|
|
693
|
+
status: status,
|
|
694
|
+
limit: limit,
|
|
695
|
+
offset: offset,
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
api_headers = {
|
|
699
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
700
|
+
"accept": 'application/json',
|
|
701
|
+
}
|
|
434
702
|
|
|
703
|
+
@client.call(
|
|
704
|
+
method: 'GET',
|
|
705
|
+
path: api_path,
|
|
706
|
+
headers: api_headers,
|
|
707
|
+
params: api_params,
|
|
708
|
+
response_type: Models::DedicatedDatabaseOperationList
|
|
709
|
+
)
|
|
435
710
|
end
|
|
436
711
|
|
|
437
712
|
# Get high availability status for a dedicated database. Returns replica
|
|
@@ -440,17 +715,18 @@ module Appwrite
|
|
|
440
715
|
# @param [String] database_id Database ID.
|
|
441
716
|
#
|
|
442
717
|
# @return [DedicatedDatabaseReplicas]
|
|
443
|
-
def get_replicas(
|
|
718
|
+
def get_replicas(
|
|
719
|
+
database_id:
|
|
720
|
+
)
|
|
444
721
|
api_path = '/tablesdb/{databaseId}/replicas'
|
|
445
722
|
.gsub('{databaseId}', database_id)
|
|
446
723
|
|
|
447
724
|
if database_id.nil?
|
|
448
|
-
|
|
725
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
449
726
|
end
|
|
450
727
|
|
|
451
|
-
api_params = {
|
|
452
|
-
|
|
453
|
-
|
|
728
|
+
api_params = {}
|
|
729
|
+
|
|
454
730
|
api_headers = {
|
|
455
731
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
456
732
|
"accept": 'application/json',
|
|
@@ -463,7 +739,6 @@ module Appwrite
|
|
|
463
739
|
params: api_params,
|
|
464
740
|
response_type: Models::DedicatedDatabaseReplicas
|
|
465
741
|
)
|
|
466
|
-
|
|
467
742
|
end
|
|
468
743
|
|
|
469
744
|
# Get real-time health and status information for a dedicated database.
|
|
@@ -473,17 +748,18 @@ module Appwrite
|
|
|
473
748
|
# @param [String] database_id Database ID.
|
|
474
749
|
#
|
|
475
750
|
# @return [DatabaseStatus]
|
|
476
|
-
def get_status(
|
|
751
|
+
def get_status(
|
|
752
|
+
database_id:
|
|
753
|
+
)
|
|
477
754
|
api_path = '/tablesdb/{databaseId}/status'
|
|
478
755
|
.gsub('{databaseId}', database_id)
|
|
479
756
|
|
|
480
757
|
if database_id.nil?
|
|
481
|
-
|
|
758
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
482
759
|
end
|
|
483
760
|
|
|
484
|
-
api_params = {
|
|
485
|
-
|
|
486
|
-
|
|
761
|
+
api_params = {}
|
|
762
|
+
|
|
487
763
|
api_headers = {
|
|
488
764
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
489
765
|
"accept": 'application/json',
|
|
@@ -496,7 +772,6 @@ module Appwrite
|
|
|
496
772
|
params: api_params,
|
|
497
773
|
response_type: Models::DatabaseStatus
|
|
498
774
|
)
|
|
499
|
-
|
|
500
775
|
end
|
|
501
776
|
|
|
502
777
|
# Get a list of all tables that belong to the provided databaseId. You can
|
|
@@ -508,12 +783,17 @@ module Appwrite
|
|
|
508
783
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
509
784
|
#
|
|
510
785
|
# @return [TableList]
|
|
511
|
-
def list_tables(
|
|
786
|
+
def list_tables(
|
|
787
|
+
database_id:,
|
|
788
|
+
queries: nil,
|
|
789
|
+
search: nil,
|
|
790
|
+
total: nil
|
|
791
|
+
)
|
|
512
792
|
api_path = '/tablesdb/{databaseId}/tables'
|
|
513
793
|
.gsub('{databaseId}', database_id)
|
|
514
794
|
|
|
515
795
|
if database_id.nil?
|
|
516
|
-
|
|
796
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
517
797
|
end
|
|
518
798
|
|
|
519
799
|
api_params = {
|
|
@@ -521,7 +801,7 @@ module Appwrite
|
|
|
521
801
|
search: search,
|
|
522
802
|
total: total,
|
|
523
803
|
}
|
|
524
|
-
|
|
804
|
+
|
|
525
805
|
api_headers = {
|
|
526
806
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
527
807
|
"accept": 'application/json',
|
|
@@ -534,7 +814,6 @@ module Appwrite
|
|
|
534
814
|
params: api_params,
|
|
535
815
|
response_type: Models::TableList
|
|
536
816
|
)
|
|
537
|
-
|
|
538
817
|
end
|
|
539
818
|
|
|
540
819
|
# Create a new Table. Before using this route, you should create a new
|
|
@@ -543,29 +822,38 @@ module Appwrite
|
|
|
543
822
|
# API or directly from your database console.
|
|
544
823
|
#
|
|
545
824
|
# @param [String] database_id Database ID.
|
|
546
|
-
# @param [String] table_id Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can
|
|
825
|
+
# @param [String] table_id Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
547
826
|
# @param [String] name Table name. Max length: 128 chars.
|
|
548
827
|
# @param [Array] permissions An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
549
828
|
# @param [] row_security Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
550
|
-
# @param [] enabled Is table enabled? When set to
|
|
551
|
-
# @param [Array] columns Array of column definitions to create. Each column should contain: key (string), type (string: string, integer,
|
|
829
|
+
# @param [] enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
|
|
830
|
+
# @param [Array] columns Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
|
|
552
831
|
# @param [Array] indexes Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
|
|
553
832
|
#
|
|
554
833
|
# @return [Table]
|
|
555
|
-
def create_table(
|
|
834
|
+
def create_table(
|
|
835
|
+
database_id:,
|
|
836
|
+
table_id:,
|
|
837
|
+
name:,
|
|
838
|
+
permissions: nil,
|
|
839
|
+
row_security: nil,
|
|
840
|
+
enabled: nil,
|
|
841
|
+
columns: nil,
|
|
842
|
+
indexes: nil
|
|
843
|
+
)
|
|
556
844
|
api_path = '/tablesdb/{databaseId}/tables'
|
|
557
845
|
.gsub('{databaseId}', database_id)
|
|
558
846
|
|
|
559
847
|
if database_id.nil?
|
|
560
|
-
|
|
848
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
561
849
|
end
|
|
562
850
|
|
|
563
851
|
if table_id.nil?
|
|
564
|
-
|
|
852
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
565
853
|
end
|
|
566
854
|
|
|
567
855
|
if name.nil?
|
|
568
|
-
|
|
856
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
569
857
|
end
|
|
570
858
|
|
|
571
859
|
api_params = {
|
|
@@ -577,7 +865,7 @@ module Appwrite
|
|
|
577
865
|
columns: columns,
|
|
578
866
|
indexes: indexes,
|
|
579
867
|
}
|
|
580
|
-
|
|
868
|
+
|
|
581
869
|
api_headers = {
|
|
582
870
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
583
871
|
"content-type": 'application/json',
|
|
@@ -591,7 +879,6 @@ module Appwrite
|
|
|
591
879
|
params: api_params,
|
|
592
880
|
response_type: Models::Table
|
|
593
881
|
)
|
|
594
|
-
|
|
595
882
|
end
|
|
596
883
|
|
|
597
884
|
# Get a table by its unique ID. This endpoint response returns a JSON object
|
|
@@ -601,22 +888,24 @@ module Appwrite
|
|
|
601
888
|
# @param [String] table_id Table ID.
|
|
602
889
|
#
|
|
603
890
|
# @return [Table]
|
|
604
|
-
def get_table(
|
|
891
|
+
def get_table(
|
|
892
|
+
database_id:,
|
|
893
|
+
table_id:
|
|
894
|
+
)
|
|
605
895
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}'
|
|
606
896
|
.gsub('{databaseId}', database_id)
|
|
607
897
|
.gsub('{tableId}', table_id)
|
|
608
898
|
|
|
609
899
|
if database_id.nil?
|
|
610
|
-
|
|
900
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
611
901
|
end
|
|
612
902
|
|
|
613
903
|
if table_id.nil?
|
|
614
|
-
|
|
904
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
615
905
|
end
|
|
616
906
|
|
|
617
|
-
api_params = {
|
|
618
|
-
|
|
619
|
-
|
|
907
|
+
api_params = {}
|
|
908
|
+
|
|
620
909
|
api_headers = {
|
|
621
910
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
622
911
|
"accept": 'application/json',
|
|
@@ -629,7 +918,6 @@ module Appwrite
|
|
|
629
918
|
params: api_params,
|
|
630
919
|
response_type: Models::Table
|
|
631
920
|
)
|
|
632
|
-
|
|
633
921
|
end
|
|
634
922
|
|
|
635
923
|
# Update a table by its unique ID.
|
|
@@ -639,21 +927,29 @@ module Appwrite
|
|
|
639
927
|
# @param [String] name Table name. Max length: 128 chars.
|
|
640
928
|
# @param [Array] permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
641
929
|
# @param [] row_security Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
642
|
-
# @param [] enabled Is table enabled? When set to
|
|
930
|
+
# @param [] enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
|
|
643
931
|
# @param [] purge When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
|
|
644
932
|
#
|
|
645
933
|
# @return [Table]
|
|
646
|
-
def update_table(
|
|
934
|
+
def update_table(
|
|
935
|
+
database_id:,
|
|
936
|
+
table_id:,
|
|
937
|
+
name: nil,
|
|
938
|
+
permissions: nil,
|
|
939
|
+
row_security: nil,
|
|
940
|
+
enabled: nil,
|
|
941
|
+
purge: nil
|
|
942
|
+
)
|
|
647
943
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}'
|
|
648
944
|
.gsub('{databaseId}', database_id)
|
|
649
945
|
.gsub('{tableId}', table_id)
|
|
650
946
|
|
|
651
947
|
if database_id.nil?
|
|
652
|
-
|
|
948
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
653
949
|
end
|
|
654
950
|
|
|
655
951
|
if table_id.nil?
|
|
656
|
-
|
|
952
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
657
953
|
end
|
|
658
954
|
|
|
659
955
|
api_params = {
|
|
@@ -663,7 +959,7 @@ module Appwrite
|
|
|
663
959
|
enabled: enabled,
|
|
664
960
|
purge: purge,
|
|
665
961
|
}
|
|
666
|
-
|
|
962
|
+
|
|
667
963
|
api_headers = {
|
|
668
964
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
669
965
|
"content-type": 'application/json',
|
|
@@ -677,7 +973,6 @@ module Appwrite
|
|
|
677
973
|
params: api_params,
|
|
678
974
|
response_type: Models::Table
|
|
679
975
|
)
|
|
680
|
-
|
|
681
976
|
end
|
|
682
977
|
|
|
683
978
|
# Delete a table by its unique ID. Only users with write permissions have
|
|
@@ -687,22 +982,24 @@ module Appwrite
|
|
|
687
982
|
# @param [String] table_id Table ID.
|
|
688
983
|
#
|
|
689
984
|
# @return []
|
|
690
|
-
def delete_table(
|
|
985
|
+
def delete_table(
|
|
986
|
+
database_id:,
|
|
987
|
+
table_id:
|
|
988
|
+
)
|
|
691
989
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}'
|
|
692
990
|
.gsub('{databaseId}', database_id)
|
|
693
991
|
.gsub('{tableId}', table_id)
|
|
694
992
|
|
|
695
993
|
if database_id.nil?
|
|
696
|
-
|
|
994
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
697
995
|
end
|
|
698
996
|
|
|
699
997
|
if table_id.nil?
|
|
700
|
-
|
|
998
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
701
999
|
end
|
|
702
1000
|
|
|
703
|
-
api_params = {
|
|
704
|
-
|
|
705
|
-
|
|
1001
|
+
api_params = {}
|
|
1002
|
+
|
|
706
1003
|
api_headers = {
|
|
707
1004
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
708
1005
|
"content-type": 'application/json',
|
|
@@ -714,7 +1011,6 @@ module Appwrite
|
|
|
714
1011
|
headers: api_headers,
|
|
715
1012
|
params: api_params,
|
|
716
1013
|
)
|
|
717
|
-
|
|
718
1014
|
end
|
|
719
1015
|
|
|
720
1016
|
# List columns in the table.
|
|
@@ -725,24 +1021,29 @@ module Appwrite
|
|
|
725
1021
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
726
1022
|
#
|
|
727
1023
|
# @return [ColumnList]
|
|
728
|
-
def list_columns(
|
|
1024
|
+
def list_columns(
|
|
1025
|
+
database_id:,
|
|
1026
|
+
table_id:,
|
|
1027
|
+
queries: nil,
|
|
1028
|
+
total: nil
|
|
1029
|
+
)
|
|
729
1030
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns'
|
|
730
1031
|
.gsub('{databaseId}', database_id)
|
|
731
1032
|
.gsub('{tableId}', table_id)
|
|
732
1033
|
|
|
733
1034
|
if database_id.nil?
|
|
734
|
-
|
|
1035
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
735
1036
|
end
|
|
736
1037
|
|
|
737
1038
|
if table_id.nil?
|
|
738
|
-
|
|
1039
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
739
1040
|
end
|
|
740
1041
|
|
|
741
1042
|
api_params = {
|
|
742
1043
|
queries: queries,
|
|
743
1044
|
total: total,
|
|
744
1045
|
}
|
|
745
|
-
|
|
1046
|
+
|
|
746
1047
|
api_headers = {
|
|
747
1048
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
748
1049
|
"accept": 'application/json',
|
|
@@ -755,12 +1056,11 @@ module Appwrite
|
|
|
755
1056
|
params: api_params,
|
|
756
1057
|
response_type: Models::ColumnList
|
|
757
1058
|
)
|
|
758
|
-
|
|
759
1059
|
end
|
|
760
1060
|
|
|
761
1061
|
# Create a bigint column. Optionally, minimum and maximum values can be
|
|
762
1062
|
# provided.
|
|
763
|
-
#
|
|
1063
|
+
#
|
|
764
1064
|
#
|
|
765
1065
|
# @param [String] database_id Database ID.
|
|
766
1066
|
# @param [String] table_id Table ID.
|
|
@@ -772,25 +1072,34 @@ module Appwrite
|
|
|
772
1072
|
# @param [] array Is column an array?
|
|
773
1073
|
#
|
|
774
1074
|
# @return [ColumnBigint]
|
|
775
|
-
def create_big_int_column(
|
|
1075
|
+
def create_big_int_column(
|
|
1076
|
+
database_id:,
|
|
1077
|
+
table_id:,
|
|
1078
|
+
key:,
|
|
1079
|
+
required:,
|
|
1080
|
+
min: nil,
|
|
1081
|
+
max: nil,
|
|
1082
|
+
default: nil,
|
|
1083
|
+
array: nil
|
|
1084
|
+
)
|
|
776
1085
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/bigint'
|
|
777
1086
|
.gsub('{databaseId}', database_id)
|
|
778
1087
|
.gsub('{tableId}', table_id)
|
|
779
1088
|
|
|
780
1089
|
if database_id.nil?
|
|
781
|
-
|
|
1090
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
782
1091
|
end
|
|
783
1092
|
|
|
784
1093
|
if table_id.nil?
|
|
785
|
-
|
|
1094
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
786
1095
|
end
|
|
787
1096
|
|
|
788
1097
|
if key.nil?
|
|
789
|
-
|
|
1098
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
790
1099
|
end
|
|
791
1100
|
|
|
792
1101
|
if required.nil?
|
|
793
|
-
|
|
1102
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
794
1103
|
end
|
|
795
1104
|
|
|
796
1105
|
api_params = {
|
|
@@ -801,7 +1110,7 @@ module Appwrite
|
|
|
801
1110
|
default: default,
|
|
802
1111
|
array: array,
|
|
803
1112
|
}
|
|
804
|
-
|
|
1113
|
+
|
|
805
1114
|
api_headers = {
|
|
806
1115
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
807
1116
|
"content-type": 'application/json',
|
|
@@ -815,12 +1124,11 @@ module Appwrite
|
|
|
815
1124
|
params: api_params,
|
|
816
1125
|
response_type: Models::ColumnBigint
|
|
817
1126
|
)
|
|
818
|
-
|
|
819
1127
|
end
|
|
820
1128
|
|
|
821
1129
|
# Update a bigint column. Changing the `default` value will not update
|
|
822
1130
|
# already existing rows.
|
|
823
|
-
#
|
|
1131
|
+
#
|
|
824
1132
|
#
|
|
825
1133
|
# @param [String] database_id Database ID.
|
|
826
1134
|
# @param [String] table_id Table ID.
|
|
@@ -832,30 +1140,39 @@ module Appwrite
|
|
|
832
1140
|
# @param [String] new_key New Column Key.
|
|
833
1141
|
#
|
|
834
1142
|
# @return [ColumnBigint]
|
|
835
|
-
def update_big_int_column(
|
|
1143
|
+
def update_big_int_column(
|
|
1144
|
+
database_id:,
|
|
1145
|
+
table_id:,
|
|
1146
|
+
key:,
|
|
1147
|
+
required:,
|
|
1148
|
+
default:,
|
|
1149
|
+
min: nil,
|
|
1150
|
+
max: nil,
|
|
1151
|
+
new_key: nil
|
|
1152
|
+
)
|
|
836
1153
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/bigint/{key}'
|
|
837
1154
|
.gsub('{databaseId}', database_id)
|
|
838
1155
|
.gsub('{tableId}', table_id)
|
|
839
1156
|
.gsub('{key}', key)
|
|
840
1157
|
|
|
841
1158
|
if database_id.nil?
|
|
842
|
-
|
|
1159
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
843
1160
|
end
|
|
844
1161
|
|
|
845
1162
|
if table_id.nil?
|
|
846
|
-
|
|
1163
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
847
1164
|
end
|
|
848
1165
|
|
|
849
1166
|
if key.nil?
|
|
850
|
-
|
|
1167
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
851
1168
|
end
|
|
852
1169
|
|
|
853
1170
|
if required.nil?
|
|
854
|
-
|
|
1171
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
855
1172
|
end
|
|
856
1173
|
|
|
857
1174
|
if default.nil?
|
|
858
|
-
|
|
1175
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
859
1176
|
end
|
|
860
1177
|
|
|
861
1178
|
api_params = {
|
|
@@ -865,7 +1182,7 @@ module Appwrite
|
|
|
865
1182
|
default: default,
|
|
866
1183
|
newKey: new_key,
|
|
867
1184
|
}
|
|
868
|
-
|
|
1185
|
+
|
|
869
1186
|
api_headers = {
|
|
870
1187
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
871
1188
|
"content-type": 'application/json',
|
|
@@ -879,11 +1196,10 @@ module Appwrite
|
|
|
879
1196
|
params: api_params,
|
|
880
1197
|
response_type: Models::ColumnBigint
|
|
881
1198
|
)
|
|
882
|
-
|
|
883
1199
|
end
|
|
884
1200
|
|
|
885
1201
|
# Create a boolean column.
|
|
886
|
-
#
|
|
1202
|
+
#
|
|
887
1203
|
#
|
|
888
1204
|
# @param [String] database_id Database ID.
|
|
889
1205
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -893,25 +1209,32 @@ module Appwrite
|
|
|
893
1209
|
# @param [] array Is column an array?
|
|
894
1210
|
#
|
|
895
1211
|
# @return [ColumnBoolean]
|
|
896
|
-
def create_boolean_column(
|
|
1212
|
+
def create_boolean_column(
|
|
1213
|
+
database_id:,
|
|
1214
|
+
table_id:,
|
|
1215
|
+
key:,
|
|
1216
|
+
required:,
|
|
1217
|
+
default: nil,
|
|
1218
|
+
array: nil
|
|
1219
|
+
)
|
|
897
1220
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean'
|
|
898
1221
|
.gsub('{databaseId}', database_id)
|
|
899
1222
|
.gsub('{tableId}', table_id)
|
|
900
1223
|
|
|
901
1224
|
if database_id.nil?
|
|
902
|
-
|
|
1225
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
903
1226
|
end
|
|
904
1227
|
|
|
905
1228
|
if table_id.nil?
|
|
906
|
-
|
|
1229
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
907
1230
|
end
|
|
908
1231
|
|
|
909
1232
|
if key.nil?
|
|
910
|
-
|
|
1233
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
911
1234
|
end
|
|
912
1235
|
|
|
913
1236
|
if required.nil?
|
|
914
|
-
|
|
1237
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
915
1238
|
end
|
|
916
1239
|
|
|
917
1240
|
api_params = {
|
|
@@ -920,7 +1243,7 @@ module Appwrite
|
|
|
920
1243
|
default: default,
|
|
921
1244
|
array: array,
|
|
922
1245
|
}
|
|
923
|
-
|
|
1246
|
+
|
|
924
1247
|
api_headers = {
|
|
925
1248
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
926
1249
|
"content-type": 'application/json',
|
|
@@ -934,7 +1257,6 @@ module Appwrite
|
|
|
934
1257
|
params: api_params,
|
|
935
1258
|
response_type: Models::ColumnBoolean
|
|
936
1259
|
)
|
|
937
|
-
|
|
938
1260
|
end
|
|
939
1261
|
|
|
940
1262
|
# Update a boolean column. Changing the `default` value will not update
|
|
@@ -948,30 +1270,37 @@ module Appwrite
|
|
|
948
1270
|
# @param [String] new_key New Column Key.
|
|
949
1271
|
#
|
|
950
1272
|
# @return [ColumnBoolean]
|
|
951
|
-
def update_boolean_column(
|
|
1273
|
+
def update_boolean_column(
|
|
1274
|
+
database_id:,
|
|
1275
|
+
table_id:,
|
|
1276
|
+
key:,
|
|
1277
|
+
required:,
|
|
1278
|
+
default:,
|
|
1279
|
+
new_key: nil
|
|
1280
|
+
)
|
|
952
1281
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}'
|
|
953
1282
|
.gsub('{databaseId}', database_id)
|
|
954
1283
|
.gsub('{tableId}', table_id)
|
|
955
1284
|
.gsub('{key}', key)
|
|
956
1285
|
|
|
957
1286
|
if database_id.nil?
|
|
958
|
-
|
|
1287
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
959
1288
|
end
|
|
960
1289
|
|
|
961
1290
|
if table_id.nil?
|
|
962
|
-
|
|
1291
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
963
1292
|
end
|
|
964
1293
|
|
|
965
1294
|
if key.nil?
|
|
966
|
-
|
|
1295
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
967
1296
|
end
|
|
968
1297
|
|
|
969
1298
|
if required.nil?
|
|
970
|
-
|
|
1299
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
971
1300
|
end
|
|
972
1301
|
|
|
973
1302
|
if default.nil?
|
|
974
|
-
|
|
1303
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
975
1304
|
end
|
|
976
1305
|
|
|
977
1306
|
api_params = {
|
|
@@ -979,7 +1308,7 @@ module Appwrite
|
|
|
979
1308
|
default: default,
|
|
980
1309
|
newKey: new_key,
|
|
981
1310
|
}
|
|
982
|
-
|
|
1311
|
+
|
|
983
1312
|
api_headers = {
|
|
984
1313
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
985
1314
|
"content-type": 'application/json',
|
|
@@ -993,7 +1322,6 @@ module Appwrite
|
|
|
993
1322
|
params: api_params,
|
|
994
1323
|
response_type: Models::ColumnBoolean
|
|
995
1324
|
)
|
|
996
|
-
|
|
997
1325
|
end
|
|
998
1326
|
|
|
999
1327
|
# Create a date time column according to the ISO 8601 standard.
|
|
@@ -1006,25 +1334,32 @@ module Appwrite
|
|
|
1006
1334
|
# @param [] array Is column an array?
|
|
1007
1335
|
#
|
|
1008
1336
|
# @return [ColumnDatetime]
|
|
1009
|
-
def create_datetime_column(
|
|
1337
|
+
def create_datetime_column(
|
|
1338
|
+
database_id:,
|
|
1339
|
+
table_id:,
|
|
1340
|
+
key:,
|
|
1341
|
+
required:,
|
|
1342
|
+
default: nil,
|
|
1343
|
+
array: nil
|
|
1344
|
+
)
|
|
1010
1345
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime'
|
|
1011
1346
|
.gsub('{databaseId}', database_id)
|
|
1012
1347
|
.gsub('{tableId}', table_id)
|
|
1013
1348
|
|
|
1014
1349
|
if database_id.nil?
|
|
1015
|
-
|
|
1350
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1016
1351
|
end
|
|
1017
1352
|
|
|
1018
1353
|
if table_id.nil?
|
|
1019
|
-
|
|
1354
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1020
1355
|
end
|
|
1021
1356
|
|
|
1022
1357
|
if key.nil?
|
|
1023
|
-
|
|
1358
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1024
1359
|
end
|
|
1025
1360
|
|
|
1026
1361
|
if required.nil?
|
|
1027
|
-
|
|
1362
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1028
1363
|
end
|
|
1029
1364
|
|
|
1030
1365
|
api_params = {
|
|
@@ -1033,7 +1368,7 @@ module Appwrite
|
|
|
1033
1368
|
default: default,
|
|
1034
1369
|
array: array,
|
|
1035
1370
|
}
|
|
1036
|
-
|
|
1371
|
+
|
|
1037
1372
|
api_headers = {
|
|
1038
1373
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1039
1374
|
"content-type": 'application/json',
|
|
@@ -1047,7 +1382,6 @@ module Appwrite
|
|
|
1047
1382
|
params: api_params,
|
|
1048
1383
|
response_type: Models::ColumnDatetime
|
|
1049
1384
|
)
|
|
1050
|
-
|
|
1051
1385
|
end
|
|
1052
1386
|
|
|
1053
1387
|
# Update a date time column. Changing the `default` value will not update
|
|
@@ -1061,30 +1395,37 @@ module Appwrite
|
|
|
1061
1395
|
# @param [String] new_key New Column Key.
|
|
1062
1396
|
#
|
|
1063
1397
|
# @return [ColumnDatetime]
|
|
1064
|
-
def update_datetime_column(
|
|
1398
|
+
def update_datetime_column(
|
|
1399
|
+
database_id:,
|
|
1400
|
+
table_id:,
|
|
1401
|
+
key:,
|
|
1402
|
+
required:,
|
|
1403
|
+
default:,
|
|
1404
|
+
new_key: nil
|
|
1405
|
+
)
|
|
1065
1406
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}'
|
|
1066
1407
|
.gsub('{databaseId}', database_id)
|
|
1067
1408
|
.gsub('{tableId}', table_id)
|
|
1068
1409
|
.gsub('{key}', key)
|
|
1069
1410
|
|
|
1070
1411
|
if database_id.nil?
|
|
1071
|
-
|
|
1412
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1072
1413
|
end
|
|
1073
1414
|
|
|
1074
1415
|
if table_id.nil?
|
|
1075
|
-
|
|
1416
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1076
1417
|
end
|
|
1077
1418
|
|
|
1078
1419
|
if key.nil?
|
|
1079
|
-
|
|
1420
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1080
1421
|
end
|
|
1081
1422
|
|
|
1082
1423
|
if required.nil?
|
|
1083
|
-
|
|
1424
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1084
1425
|
end
|
|
1085
1426
|
|
|
1086
1427
|
if default.nil?
|
|
1087
|
-
|
|
1428
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1088
1429
|
end
|
|
1089
1430
|
|
|
1090
1431
|
api_params = {
|
|
@@ -1092,7 +1433,7 @@ module Appwrite
|
|
|
1092
1433
|
default: default,
|
|
1093
1434
|
newKey: new_key,
|
|
1094
1435
|
}
|
|
1095
|
-
|
|
1436
|
+
|
|
1096
1437
|
api_headers = {
|
|
1097
1438
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1098
1439
|
"content-type": 'application/json',
|
|
@@ -1106,11 +1447,10 @@ module Appwrite
|
|
|
1106
1447
|
params: api_params,
|
|
1107
1448
|
response_type: Models::ColumnDatetime
|
|
1108
1449
|
)
|
|
1109
|
-
|
|
1110
1450
|
end
|
|
1111
1451
|
|
|
1112
1452
|
# Create an email column.
|
|
1113
|
-
#
|
|
1453
|
+
#
|
|
1114
1454
|
#
|
|
1115
1455
|
# @param [String] database_id Database ID.
|
|
1116
1456
|
# @param [String] table_id Table ID.
|
|
@@ -1120,25 +1460,32 @@ module Appwrite
|
|
|
1120
1460
|
# @param [] array Is column an array?
|
|
1121
1461
|
#
|
|
1122
1462
|
# @return [ColumnEmail]
|
|
1123
|
-
def create_email_column(
|
|
1463
|
+
def create_email_column(
|
|
1464
|
+
database_id:,
|
|
1465
|
+
table_id:,
|
|
1466
|
+
key:,
|
|
1467
|
+
required:,
|
|
1468
|
+
default: nil,
|
|
1469
|
+
array: nil
|
|
1470
|
+
)
|
|
1124
1471
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/email'
|
|
1125
1472
|
.gsub('{databaseId}', database_id)
|
|
1126
1473
|
.gsub('{tableId}', table_id)
|
|
1127
1474
|
|
|
1128
1475
|
if database_id.nil?
|
|
1129
|
-
|
|
1476
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1130
1477
|
end
|
|
1131
1478
|
|
|
1132
1479
|
if table_id.nil?
|
|
1133
|
-
|
|
1480
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1134
1481
|
end
|
|
1135
1482
|
|
|
1136
1483
|
if key.nil?
|
|
1137
|
-
|
|
1484
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1138
1485
|
end
|
|
1139
1486
|
|
|
1140
1487
|
if required.nil?
|
|
1141
|
-
|
|
1488
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1142
1489
|
end
|
|
1143
1490
|
|
|
1144
1491
|
api_params = {
|
|
@@ -1147,7 +1494,7 @@ module Appwrite
|
|
|
1147
1494
|
default: default,
|
|
1148
1495
|
array: array,
|
|
1149
1496
|
}
|
|
1150
|
-
|
|
1497
|
+
|
|
1151
1498
|
api_headers = {
|
|
1152
1499
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1153
1500
|
"content-type": 'application/json',
|
|
@@ -1161,12 +1508,11 @@ module Appwrite
|
|
|
1161
1508
|
params: api_params,
|
|
1162
1509
|
response_type: Models::ColumnEmail
|
|
1163
1510
|
)
|
|
1164
|
-
|
|
1165
1511
|
end
|
|
1166
1512
|
|
|
1167
1513
|
# Update an email column. Changing the `default` value will not update
|
|
1168
1514
|
# already existing rows.
|
|
1169
|
-
#
|
|
1515
|
+
#
|
|
1170
1516
|
#
|
|
1171
1517
|
# @param [String] database_id Database ID.
|
|
1172
1518
|
# @param [String] table_id Table ID.
|
|
@@ -1176,30 +1522,37 @@ module Appwrite
|
|
|
1176
1522
|
# @param [String] new_key New Column Key.
|
|
1177
1523
|
#
|
|
1178
1524
|
# @return [ColumnEmail]
|
|
1179
|
-
def update_email_column(
|
|
1525
|
+
def update_email_column(
|
|
1526
|
+
database_id:,
|
|
1527
|
+
table_id:,
|
|
1528
|
+
key:,
|
|
1529
|
+
required:,
|
|
1530
|
+
default:,
|
|
1531
|
+
new_key: nil
|
|
1532
|
+
)
|
|
1180
1533
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}'
|
|
1181
1534
|
.gsub('{databaseId}', database_id)
|
|
1182
1535
|
.gsub('{tableId}', table_id)
|
|
1183
1536
|
.gsub('{key}', key)
|
|
1184
1537
|
|
|
1185
1538
|
if database_id.nil?
|
|
1186
|
-
|
|
1539
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1187
1540
|
end
|
|
1188
1541
|
|
|
1189
1542
|
if table_id.nil?
|
|
1190
|
-
|
|
1543
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1191
1544
|
end
|
|
1192
1545
|
|
|
1193
1546
|
if key.nil?
|
|
1194
|
-
|
|
1547
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1195
1548
|
end
|
|
1196
1549
|
|
|
1197
1550
|
if required.nil?
|
|
1198
|
-
|
|
1551
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1199
1552
|
end
|
|
1200
1553
|
|
|
1201
1554
|
if default.nil?
|
|
1202
|
-
|
|
1555
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1203
1556
|
end
|
|
1204
1557
|
|
|
1205
1558
|
api_params = {
|
|
@@ -1207,7 +1560,7 @@ module Appwrite
|
|
|
1207
1560
|
default: default,
|
|
1208
1561
|
newKey: new_key,
|
|
1209
1562
|
}
|
|
1210
|
-
|
|
1563
|
+
|
|
1211
1564
|
api_headers = {
|
|
1212
1565
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1213
1566
|
"content-type": 'application/json',
|
|
@@ -1221,7 +1574,6 @@ module Appwrite
|
|
|
1221
1574
|
params: api_params,
|
|
1222
1575
|
response_type: Models::ColumnEmail
|
|
1223
1576
|
)
|
|
1224
|
-
|
|
1225
1577
|
end
|
|
1226
1578
|
|
|
1227
1579
|
# Create an enumeration column. The `elements` param acts as a white-list of
|
|
@@ -1236,29 +1588,37 @@ module Appwrite
|
|
|
1236
1588
|
# @param [] array Is column an array?
|
|
1237
1589
|
#
|
|
1238
1590
|
# @return [ColumnEnum]
|
|
1239
|
-
def create_enum_column(
|
|
1591
|
+
def create_enum_column(
|
|
1592
|
+
database_id:,
|
|
1593
|
+
table_id:,
|
|
1594
|
+
key:,
|
|
1595
|
+
elements:,
|
|
1596
|
+
required:,
|
|
1597
|
+
default: nil,
|
|
1598
|
+
array: nil
|
|
1599
|
+
)
|
|
1240
1600
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum'
|
|
1241
1601
|
.gsub('{databaseId}', database_id)
|
|
1242
1602
|
.gsub('{tableId}', table_id)
|
|
1243
1603
|
|
|
1244
1604
|
if database_id.nil?
|
|
1245
|
-
|
|
1605
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1246
1606
|
end
|
|
1247
1607
|
|
|
1248
1608
|
if table_id.nil?
|
|
1249
|
-
|
|
1609
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1250
1610
|
end
|
|
1251
1611
|
|
|
1252
1612
|
if key.nil?
|
|
1253
|
-
|
|
1613
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1254
1614
|
end
|
|
1255
1615
|
|
|
1256
1616
|
if elements.nil?
|
|
1257
|
-
|
|
1617
|
+
raise Appwrite::Exception.new('Missing required parameter: "elements"')
|
|
1258
1618
|
end
|
|
1259
1619
|
|
|
1260
1620
|
if required.nil?
|
|
1261
|
-
|
|
1621
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1262
1622
|
end
|
|
1263
1623
|
|
|
1264
1624
|
api_params = {
|
|
@@ -1268,7 +1628,7 @@ module Appwrite
|
|
|
1268
1628
|
default: default,
|
|
1269
1629
|
array: array,
|
|
1270
1630
|
}
|
|
1271
|
-
|
|
1631
|
+
|
|
1272
1632
|
api_headers = {
|
|
1273
1633
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1274
1634
|
"content-type": 'application/json',
|
|
@@ -1282,12 +1642,11 @@ module Appwrite
|
|
|
1282
1642
|
params: api_params,
|
|
1283
1643
|
response_type: Models::ColumnEnum
|
|
1284
1644
|
)
|
|
1285
|
-
|
|
1286
1645
|
end
|
|
1287
1646
|
|
|
1288
1647
|
# Update an enum column. Changing the `default` value will not update already
|
|
1289
1648
|
# existing rows.
|
|
1290
|
-
#
|
|
1649
|
+
#
|
|
1291
1650
|
#
|
|
1292
1651
|
# @param [String] database_id Database ID.
|
|
1293
1652
|
# @param [String] table_id Table ID.
|
|
@@ -1298,34 +1657,42 @@ module Appwrite
|
|
|
1298
1657
|
# @param [String] new_key New Column Key.
|
|
1299
1658
|
#
|
|
1300
1659
|
# @return [ColumnEnum]
|
|
1301
|
-
def update_enum_column(
|
|
1660
|
+
def update_enum_column(
|
|
1661
|
+
database_id:,
|
|
1662
|
+
table_id:,
|
|
1663
|
+
key:,
|
|
1664
|
+
elements:,
|
|
1665
|
+
required:,
|
|
1666
|
+
default:,
|
|
1667
|
+
new_key: nil
|
|
1668
|
+
)
|
|
1302
1669
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}'
|
|
1303
1670
|
.gsub('{databaseId}', database_id)
|
|
1304
1671
|
.gsub('{tableId}', table_id)
|
|
1305
1672
|
.gsub('{key}', key)
|
|
1306
1673
|
|
|
1307
1674
|
if database_id.nil?
|
|
1308
|
-
|
|
1675
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1309
1676
|
end
|
|
1310
1677
|
|
|
1311
1678
|
if table_id.nil?
|
|
1312
|
-
|
|
1679
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1313
1680
|
end
|
|
1314
1681
|
|
|
1315
1682
|
if key.nil?
|
|
1316
|
-
|
|
1683
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1317
1684
|
end
|
|
1318
1685
|
|
|
1319
1686
|
if elements.nil?
|
|
1320
|
-
|
|
1687
|
+
raise Appwrite::Exception.new('Missing required parameter: "elements"')
|
|
1321
1688
|
end
|
|
1322
1689
|
|
|
1323
1690
|
if required.nil?
|
|
1324
|
-
|
|
1691
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1325
1692
|
end
|
|
1326
1693
|
|
|
1327
1694
|
if default.nil?
|
|
1328
|
-
|
|
1695
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1329
1696
|
end
|
|
1330
1697
|
|
|
1331
1698
|
api_params = {
|
|
@@ -1334,7 +1701,7 @@ module Appwrite
|
|
|
1334
1701
|
default: default,
|
|
1335
1702
|
newKey: new_key,
|
|
1336
1703
|
}
|
|
1337
|
-
|
|
1704
|
+
|
|
1338
1705
|
api_headers = {
|
|
1339
1706
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1340
1707
|
"content-type": 'application/json',
|
|
@@ -1348,12 +1715,11 @@ module Appwrite
|
|
|
1348
1715
|
params: api_params,
|
|
1349
1716
|
response_type: Models::ColumnEnum
|
|
1350
1717
|
)
|
|
1351
|
-
|
|
1352
1718
|
end
|
|
1353
1719
|
|
|
1354
1720
|
# Create a float column. Optionally, minimum and maximum values can be
|
|
1355
1721
|
# provided.
|
|
1356
|
-
#
|
|
1722
|
+
#
|
|
1357
1723
|
#
|
|
1358
1724
|
# @param [String] database_id Database ID.
|
|
1359
1725
|
# @param [String] table_id Table ID.
|
|
@@ -1365,25 +1731,34 @@ module Appwrite
|
|
|
1365
1731
|
# @param [] array Is column an array?
|
|
1366
1732
|
#
|
|
1367
1733
|
# @return [ColumnFloat]
|
|
1368
|
-
def create_float_column(
|
|
1734
|
+
def create_float_column(
|
|
1735
|
+
database_id:,
|
|
1736
|
+
table_id:,
|
|
1737
|
+
key:,
|
|
1738
|
+
required:,
|
|
1739
|
+
min: nil,
|
|
1740
|
+
max: nil,
|
|
1741
|
+
default: nil,
|
|
1742
|
+
array: nil
|
|
1743
|
+
)
|
|
1369
1744
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/float'
|
|
1370
1745
|
.gsub('{databaseId}', database_id)
|
|
1371
1746
|
.gsub('{tableId}', table_id)
|
|
1372
1747
|
|
|
1373
1748
|
if database_id.nil?
|
|
1374
|
-
|
|
1749
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1375
1750
|
end
|
|
1376
1751
|
|
|
1377
1752
|
if table_id.nil?
|
|
1378
|
-
|
|
1753
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1379
1754
|
end
|
|
1380
1755
|
|
|
1381
1756
|
if key.nil?
|
|
1382
|
-
|
|
1757
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1383
1758
|
end
|
|
1384
1759
|
|
|
1385
1760
|
if required.nil?
|
|
1386
|
-
|
|
1761
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1387
1762
|
end
|
|
1388
1763
|
|
|
1389
1764
|
api_params = {
|
|
@@ -1394,7 +1769,7 @@ module Appwrite
|
|
|
1394
1769
|
default: default,
|
|
1395
1770
|
array: array,
|
|
1396
1771
|
}
|
|
1397
|
-
|
|
1772
|
+
|
|
1398
1773
|
api_headers = {
|
|
1399
1774
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1400
1775
|
"content-type": 'application/json',
|
|
@@ -1408,12 +1783,11 @@ module Appwrite
|
|
|
1408
1783
|
params: api_params,
|
|
1409
1784
|
response_type: Models::ColumnFloat
|
|
1410
1785
|
)
|
|
1411
|
-
|
|
1412
1786
|
end
|
|
1413
1787
|
|
|
1414
1788
|
# Update a float column. Changing the `default` value will not update already
|
|
1415
1789
|
# existing rows.
|
|
1416
|
-
#
|
|
1790
|
+
#
|
|
1417
1791
|
#
|
|
1418
1792
|
# @param [String] database_id Database ID.
|
|
1419
1793
|
# @param [String] table_id Table ID.
|
|
@@ -1425,30 +1799,39 @@ module Appwrite
|
|
|
1425
1799
|
# @param [String] new_key New Column Key.
|
|
1426
1800
|
#
|
|
1427
1801
|
# @return [ColumnFloat]
|
|
1428
|
-
def update_float_column(
|
|
1802
|
+
def update_float_column(
|
|
1803
|
+
database_id:,
|
|
1804
|
+
table_id:,
|
|
1805
|
+
key:,
|
|
1806
|
+
required:,
|
|
1807
|
+
default:,
|
|
1808
|
+
min: nil,
|
|
1809
|
+
max: nil,
|
|
1810
|
+
new_key: nil
|
|
1811
|
+
)
|
|
1429
1812
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}'
|
|
1430
1813
|
.gsub('{databaseId}', database_id)
|
|
1431
1814
|
.gsub('{tableId}', table_id)
|
|
1432
1815
|
.gsub('{key}', key)
|
|
1433
1816
|
|
|
1434
1817
|
if database_id.nil?
|
|
1435
|
-
|
|
1818
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1436
1819
|
end
|
|
1437
1820
|
|
|
1438
1821
|
if table_id.nil?
|
|
1439
|
-
|
|
1822
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1440
1823
|
end
|
|
1441
1824
|
|
|
1442
1825
|
if key.nil?
|
|
1443
|
-
|
|
1826
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1444
1827
|
end
|
|
1445
1828
|
|
|
1446
1829
|
if required.nil?
|
|
1447
|
-
|
|
1830
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1448
1831
|
end
|
|
1449
1832
|
|
|
1450
1833
|
if default.nil?
|
|
1451
|
-
|
|
1834
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1452
1835
|
end
|
|
1453
1836
|
|
|
1454
1837
|
api_params = {
|
|
@@ -1458,7 +1841,7 @@ module Appwrite
|
|
|
1458
1841
|
default: default,
|
|
1459
1842
|
newKey: new_key,
|
|
1460
1843
|
}
|
|
1461
|
-
|
|
1844
|
+
|
|
1462
1845
|
api_headers = {
|
|
1463
1846
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1464
1847
|
"content-type": 'application/json',
|
|
@@ -1472,12 +1855,11 @@ module Appwrite
|
|
|
1472
1855
|
params: api_params,
|
|
1473
1856
|
response_type: Models::ColumnFloat
|
|
1474
1857
|
)
|
|
1475
|
-
|
|
1476
1858
|
end
|
|
1477
1859
|
|
|
1478
1860
|
# Create an integer column. Optionally, minimum and maximum values can be
|
|
1479
1861
|
# provided.
|
|
1480
|
-
#
|
|
1862
|
+
#
|
|
1481
1863
|
#
|
|
1482
1864
|
# @param [String] database_id Database ID.
|
|
1483
1865
|
# @param [String] table_id Table ID.
|
|
@@ -1489,25 +1871,34 @@ module Appwrite
|
|
|
1489
1871
|
# @param [] array Is column an array?
|
|
1490
1872
|
#
|
|
1491
1873
|
# @return [ColumnInteger]
|
|
1492
|
-
def create_integer_column(
|
|
1874
|
+
def create_integer_column(
|
|
1875
|
+
database_id:,
|
|
1876
|
+
table_id:,
|
|
1877
|
+
key:,
|
|
1878
|
+
required:,
|
|
1879
|
+
min: nil,
|
|
1880
|
+
max: nil,
|
|
1881
|
+
default: nil,
|
|
1882
|
+
array: nil
|
|
1883
|
+
)
|
|
1493
1884
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer'
|
|
1494
1885
|
.gsub('{databaseId}', database_id)
|
|
1495
1886
|
.gsub('{tableId}', table_id)
|
|
1496
1887
|
|
|
1497
1888
|
if database_id.nil?
|
|
1498
|
-
|
|
1889
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1499
1890
|
end
|
|
1500
1891
|
|
|
1501
1892
|
if table_id.nil?
|
|
1502
|
-
|
|
1893
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1503
1894
|
end
|
|
1504
1895
|
|
|
1505
1896
|
if key.nil?
|
|
1506
|
-
|
|
1897
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1507
1898
|
end
|
|
1508
1899
|
|
|
1509
1900
|
if required.nil?
|
|
1510
|
-
|
|
1901
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1511
1902
|
end
|
|
1512
1903
|
|
|
1513
1904
|
api_params = {
|
|
@@ -1518,7 +1909,7 @@ module Appwrite
|
|
|
1518
1909
|
default: default,
|
|
1519
1910
|
array: array,
|
|
1520
1911
|
}
|
|
1521
|
-
|
|
1912
|
+
|
|
1522
1913
|
api_headers = {
|
|
1523
1914
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1524
1915
|
"content-type": 'application/json',
|
|
@@ -1532,12 +1923,11 @@ module Appwrite
|
|
|
1532
1923
|
params: api_params,
|
|
1533
1924
|
response_type: Models::ColumnInteger
|
|
1534
1925
|
)
|
|
1535
|
-
|
|
1536
1926
|
end
|
|
1537
1927
|
|
|
1538
1928
|
# Update an integer column. Changing the `default` value will not update
|
|
1539
1929
|
# already existing rows.
|
|
1540
|
-
#
|
|
1930
|
+
#
|
|
1541
1931
|
#
|
|
1542
1932
|
# @param [String] database_id Database ID.
|
|
1543
1933
|
# @param [String] table_id Table ID.
|
|
@@ -1549,30 +1939,39 @@ module Appwrite
|
|
|
1549
1939
|
# @param [String] new_key New Column Key.
|
|
1550
1940
|
#
|
|
1551
1941
|
# @return [ColumnInteger]
|
|
1552
|
-
def update_integer_column(
|
|
1942
|
+
def update_integer_column(
|
|
1943
|
+
database_id:,
|
|
1944
|
+
table_id:,
|
|
1945
|
+
key:,
|
|
1946
|
+
required:,
|
|
1947
|
+
default:,
|
|
1948
|
+
min: nil,
|
|
1949
|
+
max: nil,
|
|
1950
|
+
new_key: nil
|
|
1951
|
+
)
|
|
1553
1952
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}'
|
|
1554
1953
|
.gsub('{databaseId}', database_id)
|
|
1555
1954
|
.gsub('{tableId}', table_id)
|
|
1556
1955
|
.gsub('{key}', key)
|
|
1557
1956
|
|
|
1558
1957
|
if database_id.nil?
|
|
1559
|
-
|
|
1958
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1560
1959
|
end
|
|
1561
1960
|
|
|
1562
1961
|
if table_id.nil?
|
|
1563
|
-
|
|
1962
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1564
1963
|
end
|
|
1565
1964
|
|
|
1566
1965
|
if key.nil?
|
|
1567
|
-
|
|
1966
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1568
1967
|
end
|
|
1569
1968
|
|
|
1570
1969
|
if required.nil?
|
|
1571
|
-
|
|
1970
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1572
1971
|
end
|
|
1573
1972
|
|
|
1574
1973
|
if default.nil?
|
|
1575
|
-
|
|
1974
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1576
1975
|
end
|
|
1577
1976
|
|
|
1578
1977
|
api_params = {
|
|
@@ -1582,7 +1981,7 @@ module Appwrite
|
|
|
1582
1981
|
default: default,
|
|
1583
1982
|
newKey: new_key,
|
|
1584
1983
|
}
|
|
1585
|
-
|
|
1984
|
+
|
|
1586
1985
|
api_headers = {
|
|
1587
1986
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1588
1987
|
"content-type": 'application/json',
|
|
@@ -1596,11 +1995,10 @@ module Appwrite
|
|
|
1596
1995
|
params: api_params,
|
|
1597
1996
|
response_type: Models::ColumnInteger
|
|
1598
1997
|
)
|
|
1599
|
-
|
|
1600
1998
|
end
|
|
1601
1999
|
|
|
1602
2000
|
# Create IP address column.
|
|
1603
|
-
#
|
|
2001
|
+
#
|
|
1604
2002
|
#
|
|
1605
2003
|
# @param [String] database_id Database ID.
|
|
1606
2004
|
# @param [String] table_id Table ID.
|
|
@@ -1610,25 +2008,32 @@ module Appwrite
|
|
|
1610
2008
|
# @param [] array Is column an array?
|
|
1611
2009
|
#
|
|
1612
2010
|
# @return [ColumnIp]
|
|
1613
|
-
def create_ip_column(
|
|
2011
|
+
def create_ip_column(
|
|
2012
|
+
database_id:,
|
|
2013
|
+
table_id:,
|
|
2014
|
+
key:,
|
|
2015
|
+
required:,
|
|
2016
|
+
default: nil,
|
|
2017
|
+
array: nil
|
|
2018
|
+
)
|
|
1614
2019
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip'
|
|
1615
2020
|
.gsub('{databaseId}', database_id)
|
|
1616
2021
|
.gsub('{tableId}', table_id)
|
|
1617
2022
|
|
|
1618
2023
|
if database_id.nil?
|
|
1619
|
-
|
|
2024
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1620
2025
|
end
|
|
1621
2026
|
|
|
1622
2027
|
if table_id.nil?
|
|
1623
|
-
|
|
2028
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1624
2029
|
end
|
|
1625
2030
|
|
|
1626
2031
|
if key.nil?
|
|
1627
|
-
|
|
2032
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1628
2033
|
end
|
|
1629
2034
|
|
|
1630
2035
|
if required.nil?
|
|
1631
|
-
|
|
2036
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1632
2037
|
end
|
|
1633
2038
|
|
|
1634
2039
|
api_params = {
|
|
@@ -1637,7 +2042,7 @@ module Appwrite
|
|
|
1637
2042
|
default: default,
|
|
1638
2043
|
array: array,
|
|
1639
2044
|
}
|
|
1640
|
-
|
|
2045
|
+
|
|
1641
2046
|
api_headers = {
|
|
1642
2047
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1643
2048
|
"content-type": 'application/json',
|
|
@@ -1651,12 +2056,11 @@ module Appwrite
|
|
|
1651
2056
|
params: api_params,
|
|
1652
2057
|
response_type: Models::ColumnIp
|
|
1653
2058
|
)
|
|
1654
|
-
|
|
1655
2059
|
end
|
|
1656
2060
|
|
|
1657
2061
|
# Update an ip column. Changing the `default` value will not update already
|
|
1658
2062
|
# existing rows.
|
|
1659
|
-
#
|
|
2063
|
+
#
|
|
1660
2064
|
#
|
|
1661
2065
|
# @param [String] database_id Database ID.
|
|
1662
2066
|
# @param [String] table_id Table ID.
|
|
@@ -1666,30 +2070,37 @@ module Appwrite
|
|
|
1666
2070
|
# @param [String] new_key New Column Key.
|
|
1667
2071
|
#
|
|
1668
2072
|
# @return [ColumnIp]
|
|
1669
|
-
def update_ip_column(
|
|
2073
|
+
def update_ip_column(
|
|
2074
|
+
database_id:,
|
|
2075
|
+
table_id:,
|
|
2076
|
+
key:,
|
|
2077
|
+
required:,
|
|
2078
|
+
default:,
|
|
2079
|
+
new_key: nil
|
|
2080
|
+
)
|
|
1670
2081
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}'
|
|
1671
2082
|
.gsub('{databaseId}', database_id)
|
|
1672
2083
|
.gsub('{tableId}', table_id)
|
|
1673
2084
|
.gsub('{key}', key)
|
|
1674
2085
|
|
|
1675
2086
|
if database_id.nil?
|
|
1676
|
-
|
|
2087
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1677
2088
|
end
|
|
1678
2089
|
|
|
1679
2090
|
if table_id.nil?
|
|
1680
|
-
|
|
2091
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1681
2092
|
end
|
|
1682
2093
|
|
|
1683
2094
|
if key.nil?
|
|
1684
|
-
|
|
2095
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1685
2096
|
end
|
|
1686
2097
|
|
|
1687
2098
|
if required.nil?
|
|
1688
|
-
|
|
2099
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1689
2100
|
end
|
|
1690
2101
|
|
|
1691
2102
|
if default.nil?
|
|
1692
|
-
|
|
2103
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1693
2104
|
end
|
|
1694
2105
|
|
|
1695
2106
|
api_params = {
|
|
@@ -1697,7 +2108,7 @@ module Appwrite
|
|
|
1697
2108
|
default: default,
|
|
1698
2109
|
newKey: new_key,
|
|
1699
2110
|
}
|
|
1700
|
-
|
|
2111
|
+
|
|
1701
2112
|
api_headers = {
|
|
1702
2113
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1703
2114
|
"content-type": 'application/json',
|
|
@@ -1711,7 +2122,6 @@ module Appwrite
|
|
|
1711
2122
|
params: api_params,
|
|
1712
2123
|
response_type: Models::ColumnIp
|
|
1713
2124
|
)
|
|
1714
|
-
|
|
1715
2125
|
end
|
|
1716
2126
|
|
|
1717
2127
|
# Create a geometric line column.
|
|
@@ -1723,25 +2133,31 @@ module Appwrite
|
|
|
1723
2133
|
# @param [Array] default Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
|
|
1724
2134
|
#
|
|
1725
2135
|
# @return [ColumnLine]
|
|
1726
|
-
def create_line_column(
|
|
2136
|
+
def create_line_column(
|
|
2137
|
+
database_id:,
|
|
2138
|
+
table_id:,
|
|
2139
|
+
key:,
|
|
2140
|
+
required:,
|
|
2141
|
+
default: nil
|
|
2142
|
+
)
|
|
1727
2143
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'
|
|
1728
2144
|
.gsub('{databaseId}', database_id)
|
|
1729
2145
|
.gsub('{tableId}', table_id)
|
|
1730
2146
|
|
|
1731
2147
|
if database_id.nil?
|
|
1732
|
-
|
|
2148
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1733
2149
|
end
|
|
1734
2150
|
|
|
1735
2151
|
if table_id.nil?
|
|
1736
|
-
|
|
2152
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1737
2153
|
end
|
|
1738
2154
|
|
|
1739
2155
|
if key.nil?
|
|
1740
|
-
|
|
2156
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1741
2157
|
end
|
|
1742
2158
|
|
|
1743
2159
|
if required.nil?
|
|
1744
|
-
|
|
2160
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1745
2161
|
end
|
|
1746
2162
|
|
|
1747
2163
|
api_params = {
|
|
@@ -1749,7 +2165,7 @@ module Appwrite
|
|
|
1749
2165
|
required: required,
|
|
1750
2166
|
default: default,
|
|
1751
2167
|
}
|
|
1752
|
-
|
|
2168
|
+
|
|
1753
2169
|
api_headers = {
|
|
1754
2170
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1755
2171
|
"content-type": 'application/json',
|
|
@@ -1763,7 +2179,6 @@ module Appwrite
|
|
|
1763
2179
|
params: api_params,
|
|
1764
2180
|
response_type: Models::ColumnLine
|
|
1765
2181
|
)
|
|
1766
|
-
|
|
1767
2182
|
end
|
|
1768
2183
|
|
|
1769
2184
|
# Update a line column. Changing the `default` value will not update already
|
|
@@ -1777,26 +2192,33 @@ module Appwrite
|
|
|
1777
2192
|
# @param [String] new_key New Column Key.
|
|
1778
2193
|
#
|
|
1779
2194
|
# @return [ColumnLine]
|
|
1780
|
-
def update_line_column(
|
|
2195
|
+
def update_line_column(
|
|
2196
|
+
database_id:,
|
|
2197
|
+
table_id:,
|
|
2198
|
+
key:,
|
|
2199
|
+
required:,
|
|
2200
|
+
default: nil,
|
|
2201
|
+
new_key: nil
|
|
2202
|
+
)
|
|
1781
2203
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'
|
|
1782
2204
|
.gsub('{databaseId}', database_id)
|
|
1783
2205
|
.gsub('{tableId}', table_id)
|
|
1784
2206
|
.gsub('{key}', key)
|
|
1785
2207
|
|
|
1786
2208
|
if database_id.nil?
|
|
1787
|
-
|
|
2209
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1788
2210
|
end
|
|
1789
2211
|
|
|
1790
2212
|
if table_id.nil?
|
|
1791
|
-
|
|
2213
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1792
2214
|
end
|
|
1793
2215
|
|
|
1794
2216
|
if key.nil?
|
|
1795
|
-
|
|
2217
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1796
2218
|
end
|
|
1797
2219
|
|
|
1798
2220
|
if required.nil?
|
|
1799
|
-
|
|
2221
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1800
2222
|
end
|
|
1801
2223
|
|
|
1802
2224
|
api_params = {
|
|
@@ -1804,7 +2226,7 @@ module Appwrite
|
|
|
1804
2226
|
default: default,
|
|
1805
2227
|
newKey: new_key,
|
|
1806
2228
|
}
|
|
1807
|
-
|
|
2229
|
+
|
|
1808
2230
|
api_headers = {
|
|
1809
2231
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1810
2232
|
"content-type": 'application/json',
|
|
@@ -1818,11 +2240,10 @@ module Appwrite
|
|
|
1818
2240
|
params: api_params,
|
|
1819
2241
|
response_type: Models::ColumnLine
|
|
1820
2242
|
)
|
|
1821
|
-
|
|
1822
2243
|
end
|
|
1823
2244
|
|
|
1824
2245
|
# Create a longtext column.
|
|
1825
|
-
#
|
|
2246
|
+
#
|
|
1826
2247
|
#
|
|
1827
2248
|
# @param [String] database_id Database ID.
|
|
1828
2249
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -1833,25 +2254,33 @@ module Appwrite
|
|
|
1833
2254
|
# @param [] encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1834
2255
|
#
|
|
1835
2256
|
# @return [ColumnLongtext]
|
|
1836
|
-
def create_longtext_column(
|
|
2257
|
+
def create_longtext_column(
|
|
2258
|
+
database_id:,
|
|
2259
|
+
table_id:,
|
|
2260
|
+
key:,
|
|
2261
|
+
required:,
|
|
2262
|
+
default: nil,
|
|
2263
|
+
array: nil,
|
|
2264
|
+
encrypt: nil
|
|
2265
|
+
)
|
|
1837
2266
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext'
|
|
1838
2267
|
.gsub('{databaseId}', database_id)
|
|
1839
2268
|
.gsub('{tableId}', table_id)
|
|
1840
2269
|
|
|
1841
2270
|
if database_id.nil?
|
|
1842
|
-
|
|
2271
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1843
2272
|
end
|
|
1844
2273
|
|
|
1845
2274
|
if table_id.nil?
|
|
1846
|
-
|
|
2275
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1847
2276
|
end
|
|
1848
2277
|
|
|
1849
2278
|
if key.nil?
|
|
1850
|
-
|
|
2279
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1851
2280
|
end
|
|
1852
2281
|
|
|
1853
2282
|
if required.nil?
|
|
1854
|
-
|
|
2283
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1855
2284
|
end
|
|
1856
2285
|
|
|
1857
2286
|
api_params = {
|
|
@@ -1861,7 +2290,7 @@ module Appwrite
|
|
|
1861
2290
|
array: array,
|
|
1862
2291
|
encrypt: encrypt,
|
|
1863
2292
|
}
|
|
1864
|
-
|
|
2293
|
+
|
|
1865
2294
|
api_headers = {
|
|
1866
2295
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1867
2296
|
"content-type": 'application/json',
|
|
@@ -1875,12 +2304,11 @@ module Appwrite
|
|
|
1875
2304
|
params: api_params,
|
|
1876
2305
|
response_type: Models::ColumnLongtext
|
|
1877
2306
|
)
|
|
1878
|
-
|
|
1879
2307
|
end
|
|
1880
2308
|
|
|
1881
2309
|
# Update a longtext column. Changing the `default` value will not update
|
|
1882
2310
|
# already existing rows.
|
|
1883
|
-
#
|
|
2311
|
+
#
|
|
1884
2312
|
#
|
|
1885
2313
|
# @param [String] database_id Database ID.
|
|
1886
2314
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -1890,30 +2318,37 @@ module Appwrite
|
|
|
1890
2318
|
# @param [String] new_key New Column Key.
|
|
1891
2319
|
#
|
|
1892
2320
|
# @return [ColumnLongtext]
|
|
1893
|
-
def update_longtext_column(
|
|
2321
|
+
def update_longtext_column(
|
|
2322
|
+
database_id:,
|
|
2323
|
+
table_id:,
|
|
2324
|
+
key:,
|
|
2325
|
+
required:,
|
|
2326
|
+
default:,
|
|
2327
|
+
new_key: nil
|
|
2328
|
+
)
|
|
1894
2329
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}'
|
|
1895
2330
|
.gsub('{databaseId}', database_id)
|
|
1896
2331
|
.gsub('{tableId}', table_id)
|
|
1897
2332
|
.gsub('{key}', key)
|
|
1898
2333
|
|
|
1899
2334
|
if database_id.nil?
|
|
1900
|
-
|
|
2335
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1901
2336
|
end
|
|
1902
2337
|
|
|
1903
2338
|
if table_id.nil?
|
|
1904
|
-
|
|
2339
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1905
2340
|
end
|
|
1906
2341
|
|
|
1907
2342
|
if key.nil?
|
|
1908
|
-
|
|
2343
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1909
2344
|
end
|
|
1910
2345
|
|
|
1911
2346
|
if required.nil?
|
|
1912
|
-
|
|
2347
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1913
2348
|
end
|
|
1914
2349
|
|
|
1915
2350
|
if default.nil?
|
|
1916
|
-
|
|
2351
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1917
2352
|
end
|
|
1918
2353
|
|
|
1919
2354
|
api_params = {
|
|
@@ -1921,7 +2356,7 @@ module Appwrite
|
|
|
1921
2356
|
default: default,
|
|
1922
2357
|
newKey: new_key,
|
|
1923
2358
|
}
|
|
1924
|
-
|
|
2359
|
+
|
|
1925
2360
|
api_headers = {
|
|
1926
2361
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1927
2362
|
"content-type": 'application/json',
|
|
@@ -1935,11 +2370,10 @@ module Appwrite
|
|
|
1935
2370
|
params: api_params,
|
|
1936
2371
|
response_type: Models::ColumnLongtext
|
|
1937
2372
|
)
|
|
1938
|
-
|
|
1939
2373
|
end
|
|
1940
2374
|
|
|
1941
2375
|
# Create a mediumtext column.
|
|
1942
|
-
#
|
|
2376
|
+
#
|
|
1943
2377
|
#
|
|
1944
2378
|
# @param [String] database_id Database ID.
|
|
1945
2379
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -1950,25 +2384,33 @@ module Appwrite
|
|
|
1950
2384
|
# @param [] encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1951
2385
|
#
|
|
1952
2386
|
# @return [ColumnMediumtext]
|
|
1953
|
-
def create_mediumtext_column(
|
|
2387
|
+
def create_mediumtext_column(
|
|
2388
|
+
database_id:,
|
|
2389
|
+
table_id:,
|
|
2390
|
+
key:,
|
|
2391
|
+
required:,
|
|
2392
|
+
default: nil,
|
|
2393
|
+
array: nil,
|
|
2394
|
+
encrypt: nil
|
|
2395
|
+
)
|
|
1954
2396
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext'
|
|
1955
2397
|
.gsub('{databaseId}', database_id)
|
|
1956
2398
|
.gsub('{tableId}', table_id)
|
|
1957
2399
|
|
|
1958
2400
|
if database_id.nil?
|
|
1959
|
-
|
|
2401
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1960
2402
|
end
|
|
1961
2403
|
|
|
1962
2404
|
if table_id.nil?
|
|
1963
|
-
|
|
2405
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
1964
2406
|
end
|
|
1965
2407
|
|
|
1966
2408
|
if key.nil?
|
|
1967
|
-
|
|
2409
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1968
2410
|
end
|
|
1969
2411
|
|
|
1970
2412
|
if required.nil?
|
|
1971
|
-
|
|
2413
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1972
2414
|
end
|
|
1973
2415
|
|
|
1974
2416
|
api_params = {
|
|
@@ -1978,7 +2420,7 @@ module Appwrite
|
|
|
1978
2420
|
array: array,
|
|
1979
2421
|
encrypt: encrypt,
|
|
1980
2422
|
}
|
|
1981
|
-
|
|
2423
|
+
|
|
1982
2424
|
api_headers = {
|
|
1983
2425
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1984
2426
|
"content-type": 'application/json',
|
|
@@ -1992,12 +2434,11 @@ module Appwrite
|
|
|
1992
2434
|
params: api_params,
|
|
1993
2435
|
response_type: Models::ColumnMediumtext
|
|
1994
2436
|
)
|
|
1995
|
-
|
|
1996
2437
|
end
|
|
1997
2438
|
|
|
1998
2439
|
# Update a mediumtext column. Changing the `default` value will not update
|
|
1999
2440
|
# already existing rows.
|
|
2000
|
-
#
|
|
2441
|
+
#
|
|
2001
2442
|
#
|
|
2002
2443
|
# @param [String] database_id Database ID.
|
|
2003
2444
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -2007,30 +2448,37 @@ module Appwrite
|
|
|
2007
2448
|
# @param [String] new_key New Column Key.
|
|
2008
2449
|
#
|
|
2009
2450
|
# @return [ColumnMediumtext]
|
|
2010
|
-
def update_mediumtext_column(
|
|
2451
|
+
def update_mediumtext_column(
|
|
2452
|
+
database_id:,
|
|
2453
|
+
table_id:,
|
|
2454
|
+
key:,
|
|
2455
|
+
required:,
|
|
2456
|
+
default:,
|
|
2457
|
+
new_key: nil
|
|
2458
|
+
)
|
|
2011
2459
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}'
|
|
2012
2460
|
.gsub('{databaseId}', database_id)
|
|
2013
2461
|
.gsub('{tableId}', table_id)
|
|
2014
2462
|
.gsub('{key}', key)
|
|
2015
2463
|
|
|
2016
2464
|
if database_id.nil?
|
|
2017
|
-
|
|
2465
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2018
2466
|
end
|
|
2019
2467
|
|
|
2020
2468
|
if table_id.nil?
|
|
2021
|
-
|
|
2469
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2022
2470
|
end
|
|
2023
2471
|
|
|
2024
2472
|
if key.nil?
|
|
2025
|
-
|
|
2473
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2026
2474
|
end
|
|
2027
2475
|
|
|
2028
2476
|
if required.nil?
|
|
2029
|
-
|
|
2477
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2030
2478
|
end
|
|
2031
2479
|
|
|
2032
2480
|
if default.nil?
|
|
2033
|
-
|
|
2481
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2034
2482
|
end
|
|
2035
2483
|
|
|
2036
2484
|
api_params = {
|
|
@@ -2038,7 +2486,7 @@ module Appwrite
|
|
|
2038
2486
|
default: default,
|
|
2039
2487
|
newKey: new_key,
|
|
2040
2488
|
}
|
|
2041
|
-
|
|
2489
|
+
|
|
2042
2490
|
api_headers = {
|
|
2043
2491
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2044
2492
|
"content-type": 'application/json',
|
|
@@ -2052,7 +2500,6 @@ module Appwrite
|
|
|
2052
2500
|
params: api_params,
|
|
2053
2501
|
response_type: Models::ColumnMediumtext
|
|
2054
2502
|
)
|
|
2055
|
-
|
|
2056
2503
|
end
|
|
2057
2504
|
|
|
2058
2505
|
# Create a geometric point column.
|
|
@@ -2064,25 +2511,31 @@ module Appwrite
|
|
|
2064
2511
|
# @param [Array] default Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
|
|
2065
2512
|
#
|
|
2066
2513
|
# @return [ColumnPoint]
|
|
2067
|
-
def create_point_column(
|
|
2514
|
+
def create_point_column(
|
|
2515
|
+
database_id:,
|
|
2516
|
+
table_id:,
|
|
2517
|
+
key:,
|
|
2518
|
+
required:,
|
|
2519
|
+
default: nil
|
|
2520
|
+
)
|
|
2068
2521
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'
|
|
2069
2522
|
.gsub('{databaseId}', database_id)
|
|
2070
2523
|
.gsub('{tableId}', table_id)
|
|
2071
2524
|
|
|
2072
2525
|
if database_id.nil?
|
|
2073
|
-
|
|
2526
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2074
2527
|
end
|
|
2075
2528
|
|
|
2076
2529
|
if table_id.nil?
|
|
2077
|
-
|
|
2530
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2078
2531
|
end
|
|
2079
2532
|
|
|
2080
2533
|
if key.nil?
|
|
2081
|
-
|
|
2534
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2082
2535
|
end
|
|
2083
2536
|
|
|
2084
2537
|
if required.nil?
|
|
2085
|
-
|
|
2538
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2086
2539
|
end
|
|
2087
2540
|
|
|
2088
2541
|
api_params = {
|
|
@@ -2090,7 +2543,7 @@ module Appwrite
|
|
|
2090
2543
|
required: required,
|
|
2091
2544
|
default: default,
|
|
2092
2545
|
}
|
|
2093
|
-
|
|
2546
|
+
|
|
2094
2547
|
api_headers = {
|
|
2095
2548
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2096
2549
|
"content-type": 'application/json',
|
|
@@ -2104,7 +2557,6 @@ module Appwrite
|
|
|
2104
2557
|
params: api_params,
|
|
2105
2558
|
response_type: Models::ColumnPoint
|
|
2106
2559
|
)
|
|
2107
|
-
|
|
2108
2560
|
end
|
|
2109
2561
|
|
|
2110
2562
|
# Update a point column. Changing the `default` value will not update already
|
|
@@ -2118,26 +2570,33 @@ module Appwrite
|
|
|
2118
2570
|
# @param [String] new_key New Column Key.
|
|
2119
2571
|
#
|
|
2120
2572
|
# @return [ColumnPoint]
|
|
2121
|
-
def update_point_column(
|
|
2573
|
+
def update_point_column(
|
|
2574
|
+
database_id:,
|
|
2575
|
+
table_id:,
|
|
2576
|
+
key:,
|
|
2577
|
+
required:,
|
|
2578
|
+
default: nil,
|
|
2579
|
+
new_key: nil
|
|
2580
|
+
)
|
|
2122
2581
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'
|
|
2123
2582
|
.gsub('{databaseId}', database_id)
|
|
2124
2583
|
.gsub('{tableId}', table_id)
|
|
2125
2584
|
.gsub('{key}', key)
|
|
2126
2585
|
|
|
2127
2586
|
if database_id.nil?
|
|
2128
|
-
|
|
2587
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2129
2588
|
end
|
|
2130
2589
|
|
|
2131
2590
|
if table_id.nil?
|
|
2132
|
-
|
|
2591
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2133
2592
|
end
|
|
2134
2593
|
|
|
2135
2594
|
if key.nil?
|
|
2136
|
-
|
|
2595
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2137
2596
|
end
|
|
2138
2597
|
|
|
2139
2598
|
if required.nil?
|
|
2140
|
-
|
|
2599
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2141
2600
|
end
|
|
2142
2601
|
|
|
2143
2602
|
api_params = {
|
|
@@ -2145,7 +2604,7 @@ module Appwrite
|
|
|
2145
2604
|
default: default,
|
|
2146
2605
|
newKey: new_key,
|
|
2147
2606
|
}
|
|
2148
|
-
|
|
2607
|
+
|
|
2149
2608
|
api_headers = {
|
|
2150
2609
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2151
2610
|
"content-type": 'application/json',
|
|
@@ -2159,7 +2618,6 @@ module Appwrite
|
|
|
2159
2618
|
params: api_params,
|
|
2160
2619
|
response_type: Models::ColumnPoint
|
|
2161
2620
|
)
|
|
2162
|
-
|
|
2163
2621
|
end
|
|
2164
2622
|
|
|
2165
2623
|
# Create a geometric polygon column.
|
|
@@ -2171,25 +2629,31 @@ module Appwrite
|
|
|
2171
2629
|
# @param [Array] default Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
|
|
2172
2630
|
#
|
|
2173
2631
|
# @return [ColumnPolygon]
|
|
2174
|
-
def create_polygon_column(
|
|
2632
|
+
def create_polygon_column(
|
|
2633
|
+
database_id:,
|
|
2634
|
+
table_id:,
|
|
2635
|
+
key:,
|
|
2636
|
+
required:,
|
|
2637
|
+
default: nil
|
|
2638
|
+
)
|
|
2175
2639
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'
|
|
2176
2640
|
.gsub('{databaseId}', database_id)
|
|
2177
2641
|
.gsub('{tableId}', table_id)
|
|
2178
2642
|
|
|
2179
2643
|
if database_id.nil?
|
|
2180
|
-
|
|
2644
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2181
2645
|
end
|
|
2182
2646
|
|
|
2183
2647
|
if table_id.nil?
|
|
2184
|
-
|
|
2648
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2185
2649
|
end
|
|
2186
2650
|
|
|
2187
2651
|
if key.nil?
|
|
2188
|
-
|
|
2652
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2189
2653
|
end
|
|
2190
2654
|
|
|
2191
2655
|
if required.nil?
|
|
2192
|
-
|
|
2656
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2193
2657
|
end
|
|
2194
2658
|
|
|
2195
2659
|
api_params = {
|
|
@@ -2197,7 +2661,7 @@ module Appwrite
|
|
|
2197
2661
|
required: required,
|
|
2198
2662
|
default: default,
|
|
2199
2663
|
}
|
|
2200
|
-
|
|
2664
|
+
|
|
2201
2665
|
api_headers = {
|
|
2202
2666
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2203
2667
|
"content-type": 'application/json',
|
|
@@ -2211,7 +2675,6 @@ module Appwrite
|
|
|
2211
2675
|
params: api_params,
|
|
2212
2676
|
response_type: Models::ColumnPolygon
|
|
2213
2677
|
)
|
|
2214
|
-
|
|
2215
2678
|
end
|
|
2216
2679
|
|
|
2217
2680
|
# Update a polygon column. Changing the `default` value will not update
|
|
@@ -2225,26 +2688,33 @@ module Appwrite
|
|
|
2225
2688
|
# @param [String] new_key New Column Key.
|
|
2226
2689
|
#
|
|
2227
2690
|
# @return [ColumnPolygon]
|
|
2228
|
-
def update_polygon_column(
|
|
2691
|
+
def update_polygon_column(
|
|
2692
|
+
database_id:,
|
|
2693
|
+
table_id:,
|
|
2694
|
+
key:,
|
|
2695
|
+
required:,
|
|
2696
|
+
default: nil,
|
|
2697
|
+
new_key: nil
|
|
2698
|
+
)
|
|
2229
2699
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'
|
|
2230
2700
|
.gsub('{databaseId}', database_id)
|
|
2231
2701
|
.gsub('{tableId}', table_id)
|
|
2232
2702
|
.gsub('{key}', key)
|
|
2233
2703
|
|
|
2234
2704
|
if database_id.nil?
|
|
2235
|
-
|
|
2705
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2236
2706
|
end
|
|
2237
2707
|
|
|
2238
2708
|
if table_id.nil?
|
|
2239
|
-
|
|
2709
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2240
2710
|
end
|
|
2241
2711
|
|
|
2242
2712
|
if key.nil?
|
|
2243
|
-
|
|
2713
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2244
2714
|
end
|
|
2245
2715
|
|
|
2246
2716
|
if required.nil?
|
|
2247
|
-
|
|
2717
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2248
2718
|
end
|
|
2249
2719
|
|
|
2250
2720
|
api_params = {
|
|
@@ -2252,7 +2722,7 @@ module Appwrite
|
|
|
2252
2722
|
default: default,
|
|
2253
2723
|
newKey: new_key,
|
|
2254
2724
|
}
|
|
2255
|
-
|
|
2725
|
+
|
|
2256
2726
|
api_headers = {
|
|
2257
2727
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2258
2728
|
"content-type": 'application/json',
|
|
@@ -2266,42 +2736,50 @@ module Appwrite
|
|
|
2266
2736
|
params: api_params,
|
|
2267
2737
|
response_type: Models::ColumnPolygon
|
|
2268
2738
|
)
|
|
2269
|
-
|
|
2270
2739
|
end
|
|
2271
2740
|
|
|
2272
2741
|
# Create relationship column. [Learn more about relationship
|
|
2273
2742
|
# columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
2274
|
-
#
|
|
2743
|
+
#
|
|
2275
2744
|
#
|
|
2276
2745
|
# @param [String] database_id Database ID.
|
|
2277
2746
|
# @param [String] table_id Table ID.
|
|
2278
2747
|
# @param [String] related_table_id Related Table ID.
|
|
2279
|
-
# @param [RelationshipType] type
|
|
2748
|
+
# @param [RelationshipType] type Relationship type. Possible values are: oneToOne, oneToMany, manyToOne, manyToMany.
|
|
2280
2749
|
# @param [] two_way Is Two Way?
|
|
2281
2750
|
# @param [String] key Column Key.
|
|
2282
2751
|
# @param [String] two_way_key Two Way Column Key.
|
|
2283
|
-
# @param [RelationMutate] on_delete
|
|
2752
|
+
# @param [RelationMutate] on_delete Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
2284
2753
|
#
|
|
2285
2754
|
# @return [ColumnRelationship]
|
|
2286
|
-
def create_relationship_column(
|
|
2755
|
+
def create_relationship_column(
|
|
2756
|
+
database_id:,
|
|
2757
|
+
table_id:,
|
|
2758
|
+
related_table_id:,
|
|
2759
|
+
type:,
|
|
2760
|
+
two_way: nil,
|
|
2761
|
+
key: nil,
|
|
2762
|
+
two_way_key: nil,
|
|
2763
|
+
on_delete: nil
|
|
2764
|
+
)
|
|
2287
2765
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship'
|
|
2288
2766
|
.gsub('{databaseId}', database_id)
|
|
2289
2767
|
.gsub('{tableId}', table_id)
|
|
2290
2768
|
|
|
2291
2769
|
if database_id.nil?
|
|
2292
|
-
|
|
2770
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2293
2771
|
end
|
|
2294
2772
|
|
|
2295
2773
|
if table_id.nil?
|
|
2296
|
-
|
|
2774
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2297
2775
|
end
|
|
2298
2776
|
|
|
2299
2777
|
if related_table_id.nil?
|
|
2300
|
-
|
|
2778
|
+
raise Appwrite::Exception.new('Missing required parameter: "relatedTableId"')
|
|
2301
2779
|
end
|
|
2302
2780
|
|
|
2303
2781
|
if type.nil?
|
|
2304
|
-
|
|
2782
|
+
raise Appwrite::Exception.new('Missing required parameter: "type"')
|
|
2305
2783
|
end
|
|
2306
2784
|
|
|
2307
2785
|
api_params = {
|
|
@@ -2312,7 +2790,7 @@ module Appwrite
|
|
|
2312
2790
|
twoWayKey: two_way_key,
|
|
2313
2791
|
onDelete: on_delete,
|
|
2314
2792
|
}
|
|
2315
|
-
|
|
2793
|
+
|
|
2316
2794
|
api_headers = {
|
|
2317
2795
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2318
2796
|
"content-type": 'application/json',
|
|
@@ -2326,14 +2804,13 @@ module Appwrite
|
|
|
2326
2804
|
params: api_params,
|
|
2327
2805
|
response_type: Models::ColumnRelationship
|
|
2328
2806
|
)
|
|
2329
|
-
|
|
2330
2807
|
end
|
|
2331
2808
|
|
|
2332
2809
|
#
|
|
2333
2810
|
# @deprecated This API has been deprecated since 1.9.0. Please use `TablesDB.createTextColumn` instead.
|
|
2334
2811
|
#
|
|
2335
2812
|
# Create a string column.
|
|
2336
|
-
#
|
|
2813
|
+
#
|
|
2337
2814
|
#
|
|
2338
2815
|
# @param [String] database_id Database ID.
|
|
2339
2816
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -2345,29 +2822,38 @@ module Appwrite
|
|
|
2345
2822
|
# @param [] encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
2346
2823
|
#
|
|
2347
2824
|
# @return [ColumnString]
|
|
2348
|
-
def create_string_column(
|
|
2825
|
+
def create_string_column(
|
|
2826
|
+
database_id:,
|
|
2827
|
+
table_id:,
|
|
2828
|
+
key:,
|
|
2829
|
+
size:,
|
|
2830
|
+
required:,
|
|
2831
|
+
default: nil,
|
|
2832
|
+
array: nil,
|
|
2833
|
+
encrypt: nil
|
|
2834
|
+
)
|
|
2349
2835
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/string'
|
|
2350
2836
|
.gsub('{databaseId}', database_id)
|
|
2351
2837
|
.gsub('{tableId}', table_id)
|
|
2352
2838
|
|
|
2353
2839
|
if database_id.nil?
|
|
2354
|
-
|
|
2840
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2355
2841
|
end
|
|
2356
2842
|
|
|
2357
2843
|
if table_id.nil?
|
|
2358
|
-
|
|
2844
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2359
2845
|
end
|
|
2360
2846
|
|
|
2361
2847
|
if key.nil?
|
|
2362
|
-
|
|
2848
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2363
2849
|
end
|
|
2364
2850
|
|
|
2365
2851
|
if size.nil?
|
|
2366
|
-
|
|
2852
|
+
raise Appwrite::Exception.new('Missing required parameter: "size"')
|
|
2367
2853
|
end
|
|
2368
2854
|
|
|
2369
2855
|
if required.nil?
|
|
2370
|
-
|
|
2856
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2371
2857
|
end
|
|
2372
2858
|
|
|
2373
2859
|
api_params = {
|
|
@@ -2378,7 +2864,7 @@ module Appwrite
|
|
|
2378
2864
|
array: array,
|
|
2379
2865
|
encrypt: encrypt,
|
|
2380
2866
|
}
|
|
2381
|
-
|
|
2867
|
+
|
|
2382
2868
|
api_headers = {
|
|
2383
2869
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2384
2870
|
"content-type": 'application/json',
|
|
@@ -2392,7 +2878,6 @@ module Appwrite
|
|
|
2392
2878
|
params: api_params,
|
|
2393
2879
|
response_type: Models::ColumnString
|
|
2394
2880
|
)
|
|
2395
|
-
|
|
2396
2881
|
end
|
|
2397
2882
|
|
|
2398
2883
|
#
|
|
@@ -2400,7 +2885,7 @@ module Appwrite
|
|
|
2400
2885
|
#
|
|
2401
2886
|
# Update a string column. Changing the `default` value will not update
|
|
2402
2887
|
# already existing rows.
|
|
2403
|
-
#
|
|
2888
|
+
#
|
|
2404
2889
|
#
|
|
2405
2890
|
# @param [String] database_id Database ID.
|
|
2406
2891
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -2411,30 +2896,38 @@ module Appwrite
|
|
|
2411
2896
|
# @param [String] new_key New Column Key.
|
|
2412
2897
|
#
|
|
2413
2898
|
# @return [ColumnString]
|
|
2414
|
-
def update_string_column(
|
|
2899
|
+
def update_string_column(
|
|
2900
|
+
database_id:,
|
|
2901
|
+
table_id:,
|
|
2902
|
+
key:,
|
|
2903
|
+
required:,
|
|
2904
|
+
default:,
|
|
2905
|
+
size: nil,
|
|
2906
|
+
new_key: nil
|
|
2907
|
+
)
|
|
2415
2908
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}'
|
|
2416
2909
|
.gsub('{databaseId}', database_id)
|
|
2417
2910
|
.gsub('{tableId}', table_id)
|
|
2418
2911
|
.gsub('{key}', key)
|
|
2419
2912
|
|
|
2420
2913
|
if database_id.nil?
|
|
2421
|
-
|
|
2914
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2422
2915
|
end
|
|
2423
2916
|
|
|
2424
2917
|
if table_id.nil?
|
|
2425
|
-
|
|
2918
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2426
2919
|
end
|
|
2427
2920
|
|
|
2428
2921
|
if key.nil?
|
|
2429
|
-
|
|
2922
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2430
2923
|
end
|
|
2431
2924
|
|
|
2432
2925
|
if required.nil?
|
|
2433
|
-
|
|
2926
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2434
2927
|
end
|
|
2435
2928
|
|
|
2436
2929
|
if default.nil?
|
|
2437
|
-
|
|
2930
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2438
2931
|
end
|
|
2439
2932
|
|
|
2440
2933
|
api_params = {
|
|
@@ -2443,7 +2936,7 @@ module Appwrite
|
|
|
2443
2936
|
size: size,
|
|
2444
2937
|
newKey: new_key,
|
|
2445
2938
|
}
|
|
2446
|
-
|
|
2939
|
+
|
|
2447
2940
|
api_headers = {
|
|
2448
2941
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2449
2942
|
"content-type": 'application/json',
|
|
@@ -2457,11 +2950,10 @@ module Appwrite
|
|
|
2457
2950
|
params: api_params,
|
|
2458
2951
|
response_type: Models::ColumnString
|
|
2459
2952
|
)
|
|
2460
|
-
|
|
2461
2953
|
end
|
|
2462
2954
|
|
|
2463
2955
|
# Create a text column.
|
|
2464
|
-
#
|
|
2956
|
+
#
|
|
2465
2957
|
#
|
|
2466
2958
|
# @param [String] database_id Database ID.
|
|
2467
2959
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -2472,25 +2964,33 @@ module Appwrite
|
|
|
2472
2964
|
# @param [] encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
2473
2965
|
#
|
|
2474
2966
|
# @return [ColumnText]
|
|
2475
|
-
def create_text_column(
|
|
2967
|
+
def create_text_column(
|
|
2968
|
+
database_id:,
|
|
2969
|
+
table_id:,
|
|
2970
|
+
key:,
|
|
2971
|
+
required:,
|
|
2972
|
+
default: nil,
|
|
2973
|
+
array: nil,
|
|
2974
|
+
encrypt: nil
|
|
2975
|
+
)
|
|
2476
2976
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/text'
|
|
2477
2977
|
.gsub('{databaseId}', database_id)
|
|
2478
2978
|
.gsub('{tableId}', table_id)
|
|
2479
2979
|
|
|
2480
2980
|
if database_id.nil?
|
|
2481
|
-
|
|
2981
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2482
2982
|
end
|
|
2483
2983
|
|
|
2484
2984
|
if table_id.nil?
|
|
2485
|
-
|
|
2985
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2486
2986
|
end
|
|
2487
2987
|
|
|
2488
2988
|
if key.nil?
|
|
2489
|
-
|
|
2989
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2490
2990
|
end
|
|
2491
2991
|
|
|
2492
2992
|
if required.nil?
|
|
2493
|
-
|
|
2993
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2494
2994
|
end
|
|
2495
2995
|
|
|
2496
2996
|
api_params = {
|
|
@@ -2500,7 +3000,7 @@ module Appwrite
|
|
|
2500
3000
|
array: array,
|
|
2501
3001
|
encrypt: encrypt,
|
|
2502
3002
|
}
|
|
2503
|
-
|
|
3003
|
+
|
|
2504
3004
|
api_headers = {
|
|
2505
3005
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2506
3006
|
"content-type": 'application/json',
|
|
@@ -2514,12 +3014,11 @@ module Appwrite
|
|
|
2514
3014
|
params: api_params,
|
|
2515
3015
|
response_type: Models::ColumnText
|
|
2516
3016
|
)
|
|
2517
|
-
|
|
2518
3017
|
end
|
|
2519
3018
|
|
|
2520
3019
|
# Update a text column. Changing the `default` value will not update already
|
|
2521
3020
|
# existing rows.
|
|
2522
|
-
#
|
|
3021
|
+
#
|
|
2523
3022
|
#
|
|
2524
3023
|
# @param [String] database_id Database ID.
|
|
2525
3024
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -2529,30 +3028,37 @@ module Appwrite
|
|
|
2529
3028
|
# @param [String] new_key New Column Key.
|
|
2530
3029
|
#
|
|
2531
3030
|
# @return [ColumnText]
|
|
2532
|
-
def update_text_column(
|
|
3031
|
+
def update_text_column(
|
|
3032
|
+
database_id:,
|
|
3033
|
+
table_id:,
|
|
3034
|
+
key:,
|
|
3035
|
+
required:,
|
|
3036
|
+
default:,
|
|
3037
|
+
new_key: nil
|
|
3038
|
+
)
|
|
2533
3039
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}'
|
|
2534
3040
|
.gsub('{databaseId}', database_id)
|
|
2535
3041
|
.gsub('{tableId}', table_id)
|
|
2536
3042
|
.gsub('{key}', key)
|
|
2537
3043
|
|
|
2538
3044
|
if database_id.nil?
|
|
2539
|
-
|
|
3045
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2540
3046
|
end
|
|
2541
3047
|
|
|
2542
3048
|
if table_id.nil?
|
|
2543
|
-
|
|
3049
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2544
3050
|
end
|
|
2545
3051
|
|
|
2546
3052
|
if key.nil?
|
|
2547
|
-
|
|
3053
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2548
3054
|
end
|
|
2549
3055
|
|
|
2550
3056
|
if required.nil?
|
|
2551
|
-
|
|
3057
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2552
3058
|
end
|
|
2553
3059
|
|
|
2554
3060
|
if default.nil?
|
|
2555
|
-
|
|
3061
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2556
3062
|
end
|
|
2557
3063
|
|
|
2558
3064
|
api_params = {
|
|
@@ -2560,7 +3066,7 @@ module Appwrite
|
|
|
2560
3066
|
default: default,
|
|
2561
3067
|
newKey: new_key,
|
|
2562
3068
|
}
|
|
2563
|
-
|
|
3069
|
+
|
|
2564
3070
|
api_headers = {
|
|
2565
3071
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2566
3072
|
"content-type": 'application/json',
|
|
@@ -2574,11 +3080,10 @@ module Appwrite
|
|
|
2574
3080
|
params: api_params,
|
|
2575
3081
|
response_type: Models::ColumnText
|
|
2576
3082
|
)
|
|
2577
|
-
|
|
2578
3083
|
end
|
|
2579
3084
|
|
|
2580
3085
|
# Create a URL column.
|
|
2581
|
-
#
|
|
3086
|
+
#
|
|
2582
3087
|
#
|
|
2583
3088
|
# @param [String] database_id Database ID.
|
|
2584
3089
|
# @param [String] table_id Table ID.
|
|
@@ -2588,25 +3093,32 @@ module Appwrite
|
|
|
2588
3093
|
# @param [] array Is column an array?
|
|
2589
3094
|
#
|
|
2590
3095
|
# @return [ColumnUrl]
|
|
2591
|
-
def create_url_column(
|
|
3096
|
+
def create_url_column(
|
|
3097
|
+
database_id:,
|
|
3098
|
+
table_id:,
|
|
3099
|
+
key:,
|
|
3100
|
+
required:,
|
|
3101
|
+
default: nil,
|
|
3102
|
+
array: nil
|
|
3103
|
+
)
|
|
2592
3104
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/url'
|
|
2593
3105
|
.gsub('{databaseId}', database_id)
|
|
2594
3106
|
.gsub('{tableId}', table_id)
|
|
2595
3107
|
|
|
2596
3108
|
if database_id.nil?
|
|
2597
|
-
|
|
3109
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2598
3110
|
end
|
|
2599
3111
|
|
|
2600
3112
|
if table_id.nil?
|
|
2601
|
-
|
|
3113
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2602
3114
|
end
|
|
2603
3115
|
|
|
2604
3116
|
if key.nil?
|
|
2605
|
-
|
|
3117
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2606
3118
|
end
|
|
2607
3119
|
|
|
2608
3120
|
if required.nil?
|
|
2609
|
-
|
|
3121
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2610
3122
|
end
|
|
2611
3123
|
|
|
2612
3124
|
api_params = {
|
|
@@ -2615,7 +3127,7 @@ module Appwrite
|
|
|
2615
3127
|
default: default,
|
|
2616
3128
|
array: array,
|
|
2617
3129
|
}
|
|
2618
|
-
|
|
3130
|
+
|
|
2619
3131
|
api_headers = {
|
|
2620
3132
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2621
3133
|
"content-type": 'application/json',
|
|
@@ -2629,12 +3141,11 @@ module Appwrite
|
|
|
2629
3141
|
params: api_params,
|
|
2630
3142
|
response_type: Models::ColumnUrl
|
|
2631
3143
|
)
|
|
2632
|
-
|
|
2633
3144
|
end
|
|
2634
3145
|
|
|
2635
3146
|
# Update an url column. Changing the `default` value will not update already
|
|
2636
3147
|
# existing rows.
|
|
2637
|
-
#
|
|
3148
|
+
#
|
|
2638
3149
|
#
|
|
2639
3150
|
# @param [String] database_id Database ID.
|
|
2640
3151
|
# @param [String] table_id Table ID.
|
|
@@ -2644,30 +3155,37 @@ module Appwrite
|
|
|
2644
3155
|
# @param [String] new_key New Column Key.
|
|
2645
3156
|
#
|
|
2646
3157
|
# @return [ColumnUrl]
|
|
2647
|
-
def update_url_column(
|
|
3158
|
+
def update_url_column(
|
|
3159
|
+
database_id:,
|
|
3160
|
+
table_id:,
|
|
3161
|
+
key:,
|
|
3162
|
+
required:,
|
|
3163
|
+
default:,
|
|
3164
|
+
new_key: nil
|
|
3165
|
+
)
|
|
2648
3166
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}'
|
|
2649
3167
|
.gsub('{databaseId}', database_id)
|
|
2650
3168
|
.gsub('{tableId}', table_id)
|
|
2651
3169
|
.gsub('{key}', key)
|
|
2652
3170
|
|
|
2653
3171
|
if database_id.nil?
|
|
2654
|
-
|
|
3172
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2655
3173
|
end
|
|
2656
3174
|
|
|
2657
3175
|
if table_id.nil?
|
|
2658
|
-
|
|
3176
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2659
3177
|
end
|
|
2660
3178
|
|
|
2661
3179
|
if key.nil?
|
|
2662
|
-
|
|
3180
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2663
3181
|
end
|
|
2664
3182
|
|
|
2665
3183
|
if required.nil?
|
|
2666
|
-
|
|
3184
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2667
3185
|
end
|
|
2668
3186
|
|
|
2669
3187
|
if default.nil?
|
|
2670
|
-
|
|
3188
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2671
3189
|
end
|
|
2672
3190
|
|
|
2673
3191
|
api_params = {
|
|
@@ -2675,7 +3193,7 @@ module Appwrite
|
|
|
2675
3193
|
default: default,
|
|
2676
3194
|
newKey: new_key,
|
|
2677
3195
|
}
|
|
2678
|
-
|
|
3196
|
+
|
|
2679
3197
|
api_headers = {
|
|
2680
3198
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2681
3199
|
"content-type": 'application/json',
|
|
@@ -2689,11 +3207,10 @@ module Appwrite
|
|
|
2689
3207
|
params: api_params,
|
|
2690
3208
|
response_type: Models::ColumnUrl
|
|
2691
3209
|
)
|
|
2692
|
-
|
|
2693
3210
|
end
|
|
2694
3211
|
|
|
2695
3212
|
# Create a varchar column.
|
|
2696
|
-
#
|
|
3213
|
+
#
|
|
2697
3214
|
#
|
|
2698
3215
|
# @param [String] database_id Database ID.
|
|
2699
3216
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -2705,29 +3222,38 @@ module Appwrite
|
|
|
2705
3222
|
# @param [] encrypt Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
2706
3223
|
#
|
|
2707
3224
|
# @return [ColumnVarchar]
|
|
2708
|
-
def create_varchar_column(
|
|
3225
|
+
def create_varchar_column(
|
|
3226
|
+
database_id:,
|
|
3227
|
+
table_id:,
|
|
3228
|
+
key:,
|
|
3229
|
+
size:,
|
|
3230
|
+
required:,
|
|
3231
|
+
default: nil,
|
|
3232
|
+
array: nil,
|
|
3233
|
+
encrypt: nil
|
|
3234
|
+
)
|
|
2709
3235
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar'
|
|
2710
3236
|
.gsub('{databaseId}', database_id)
|
|
2711
3237
|
.gsub('{tableId}', table_id)
|
|
2712
3238
|
|
|
2713
3239
|
if database_id.nil?
|
|
2714
|
-
|
|
3240
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2715
3241
|
end
|
|
2716
3242
|
|
|
2717
3243
|
if table_id.nil?
|
|
2718
|
-
|
|
3244
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2719
3245
|
end
|
|
2720
3246
|
|
|
2721
3247
|
if key.nil?
|
|
2722
|
-
|
|
3248
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2723
3249
|
end
|
|
2724
3250
|
|
|
2725
3251
|
if size.nil?
|
|
2726
|
-
|
|
3252
|
+
raise Appwrite::Exception.new('Missing required parameter: "size"')
|
|
2727
3253
|
end
|
|
2728
3254
|
|
|
2729
3255
|
if required.nil?
|
|
2730
|
-
|
|
3256
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2731
3257
|
end
|
|
2732
3258
|
|
|
2733
3259
|
api_params = {
|
|
@@ -2738,7 +3264,7 @@ module Appwrite
|
|
|
2738
3264
|
array: array,
|
|
2739
3265
|
encrypt: encrypt,
|
|
2740
3266
|
}
|
|
2741
|
-
|
|
3267
|
+
|
|
2742
3268
|
api_headers = {
|
|
2743
3269
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2744
3270
|
"content-type": 'application/json',
|
|
@@ -2752,12 +3278,11 @@ module Appwrite
|
|
|
2752
3278
|
params: api_params,
|
|
2753
3279
|
response_type: Models::ColumnVarchar
|
|
2754
3280
|
)
|
|
2755
|
-
|
|
2756
3281
|
end
|
|
2757
3282
|
|
|
2758
3283
|
# Update a varchar column. Changing the `default` value will not update
|
|
2759
3284
|
# already existing rows.
|
|
2760
|
-
#
|
|
3285
|
+
#
|
|
2761
3286
|
#
|
|
2762
3287
|
# @param [String] database_id Database ID.
|
|
2763
3288
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
|
|
@@ -2768,30 +3293,38 @@ module Appwrite
|
|
|
2768
3293
|
# @param [String] new_key New Column Key.
|
|
2769
3294
|
#
|
|
2770
3295
|
# @return [ColumnVarchar]
|
|
2771
|
-
def update_varchar_column(
|
|
3296
|
+
def update_varchar_column(
|
|
3297
|
+
database_id:,
|
|
3298
|
+
table_id:,
|
|
3299
|
+
key:,
|
|
3300
|
+
required:,
|
|
3301
|
+
default:,
|
|
3302
|
+
size: nil,
|
|
3303
|
+
new_key: nil
|
|
3304
|
+
)
|
|
2772
3305
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}'
|
|
2773
3306
|
.gsub('{databaseId}', database_id)
|
|
2774
3307
|
.gsub('{tableId}', table_id)
|
|
2775
3308
|
.gsub('{key}', key)
|
|
2776
3309
|
|
|
2777
3310
|
if database_id.nil?
|
|
2778
|
-
|
|
3311
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2779
3312
|
end
|
|
2780
3313
|
|
|
2781
3314
|
if table_id.nil?
|
|
2782
|
-
|
|
3315
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2783
3316
|
end
|
|
2784
3317
|
|
|
2785
3318
|
if key.nil?
|
|
2786
|
-
|
|
3319
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2787
3320
|
end
|
|
2788
3321
|
|
|
2789
3322
|
if required.nil?
|
|
2790
|
-
|
|
3323
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2791
3324
|
end
|
|
2792
3325
|
|
|
2793
3326
|
if default.nil?
|
|
2794
|
-
|
|
3327
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2795
3328
|
end
|
|
2796
3329
|
|
|
2797
3330
|
api_params = {
|
|
@@ -2800,7 +3333,7 @@ module Appwrite
|
|
|
2800
3333
|
size: size,
|
|
2801
3334
|
newKey: new_key,
|
|
2802
3335
|
}
|
|
2803
|
-
|
|
3336
|
+
|
|
2804
3337
|
api_headers = {
|
|
2805
3338
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2806
3339
|
"content-type": 'application/json',
|
|
@@ -2814,7 +3347,6 @@ module Appwrite
|
|
|
2814
3347
|
params: api_params,
|
|
2815
3348
|
response_type: Models::ColumnVarchar
|
|
2816
3349
|
)
|
|
2817
|
-
|
|
2818
3350
|
end
|
|
2819
3351
|
|
|
2820
3352
|
# Get column by ID.
|
|
@@ -2824,27 +3356,30 @@ module Appwrite
|
|
|
2824
3356
|
# @param [String] key Column Key.
|
|
2825
3357
|
#
|
|
2826
3358
|
# @return [ColumnBoolean, ColumnInteger, ColumnFloat, ColumnEmail, ColumnEnum, ColumnUrl, ColumnIp, ColumnDatetime, ColumnRelationship, ColumnString]
|
|
2827
|
-
def get_column(
|
|
3359
|
+
def get_column(
|
|
3360
|
+
database_id:,
|
|
3361
|
+
table_id:,
|
|
3362
|
+
key:
|
|
3363
|
+
)
|
|
2828
3364
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'
|
|
2829
3365
|
.gsub('{databaseId}', database_id)
|
|
2830
3366
|
.gsub('{tableId}', table_id)
|
|
2831
3367
|
.gsub('{key}', key)
|
|
2832
3368
|
|
|
2833
3369
|
if database_id.nil?
|
|
2834
|
-
|
|
3370
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2835
3371
|
end
|
|
2836
3372
|
|
|
2837
3373
|
if table_id.nil?
|
|
2838
|
-
|
|
3374
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2839
3375
|
end
|
|
2840
3376
|
|
|
2841
3377
|
if key.nil?
|
|
2842
|
-
|
|
3378
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2843
3379
|
end
|
|
2844
3380
|
|
|
2845
|
-
api_params = {
|
|
2846
|
-
|
|
2847
|
-
|
|
3381
|
+
api_params = {}
|
|
3382
|
+
|
|
2848
3383
|
api_headers = {
|
|
2849
3384
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2850
3385
|
"accept": 'application/json',
|
|
@@ -2912,7 +3447,6 @@ module Appwrite
|
|
|
2912
3447
|
end
|
|
2913
3448
|
|
|
2914
3449
|
raise Exception, "Unable to match response to any expected response model"
|
|
2915
|
-
|
|
2916
3450
|
end
|
|
2917
3451
|
|
|
2918
3452
|
# Deletes a column.
|
|
@@ -2922,27 +3456,30 @@ module Appwrite
|
|
|
2922
3456
|
# @param [String] key Column Key.
|
|
2923
3457
|
#
|
|
2924
3458
|
# @return []
|
|
2925
|
-
def delete_column(
|
|
3459
|
+
def delete_column(
|
|
3460
|
+
database_id:,
|
|
3461
|
+
table_id:,
|
|
3462
|
+
key:
|
|
3463
|
+
)
|
|
2926
3464
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}'
|
|
2927
3465
|
.gsub('{databaseId}', database_id)
|
|
2928
3466
|
.gsub('{tableId}', table_id)
|
|
2929
3467
|
.gsub('{key}', key)
|
|
2930
3468
|
|
|
2931
3469
|
if database_id.nil?
|
|
2932
|
-
|
|
3470
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2933
3471
|
end
|
|
2934
3472
|
|
|
2935
3473
|
if table_id.nil?
|
|
2936
|
-
|
|
3474
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2937
3475
|
end
|
|
2938
3476
|
|
|
2939
3477
|
if key.nil?
|
|
2940
|
-
|
|
3478
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2941
3479
|
end
|
|
2942
3480
|
|
|
2943
|
-
api_params = {
|
|
2944
|
-
|
|
2945
|
-
|
|
3481
|
+
api_params = {}
|
|
3482
|
+
|
|
2946
3483
|
api_headers = {
|
|
2947
3484
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2948
3485
|
"content-type": 'application/json',
|
|
@@ -2954,43 +3491,48 @@ module Appwrite
|
|
|
2954
3491
|
headers: api_headers,
|
|
2955
3492
|
params: api_params,
|
|
2956
3493
|
)
|
|
2957
|
-
|
|
2958
3494
|
end
|
|
2959
3495
|
|
|
2960
3496
|
# Update relationship column. [Learn more about relationship
|
|
2961
3497
|
# columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
2962
|
-
#
|
|
3498
|
+
#
|
|
2963
3499
|
#
|
|
2964
3500
|
# @param [String] database_id Database ID.
|
|
2965
3501
|
# @param [String] table_id Table ID.
|
|
2966
3502
|
# @param [String] key Column Key.
|
|
2967
|
-
# @param [RelationMutate] on_delete
|
|
3503
|
+
# @param [RelationMutate] on_delete Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
2968
3504
|
# @param [String] new_key New Column Key.
|
|
2969
3505
|
#
|
|
2970
3506
|
# @return [ColumnRelationship]
|
|
2971
|
-
def update_relationship_column(
|
|
3507
|
+
def update_relationship_column(
|
|
3508
|
+
database_id:,
|
|
3509
|
+
table_id:,
|
|
3510
|
+
key:,
|
|
3511
|
+
on_delete: nil,
|
|
3512
|
+
new_key: nil
|
|
3513
|
+
)
|
|
2972
3514
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/{key}/relationship'
|
|
2973
3515
|
.gsub('{databaseId}', database_id)
|
|
2974
3516
|
.gsub('{tableId}', table_id)
|
|
2975
3517
|
.gsub('{key}', key)
|
|
2976
3518
|
|
|
2977
3519
|
if database_id.nil?
|
|
2978
|
-
|
|
3520
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2979
3521
|
end
|
|
2980
3522
|
|
|
2981
3523
|
if table_id.nil?
|
|
2982
|
-
|
|
3524
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
2983
3525
|
end
|
|
2984
3526
|
|
|
2985
3527
|
if key.nil?
|
|
2986
|
-
|
|
3528
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2987
3529
|
end
|
|
2988
3530
|
|
|
2989
3531
|
api_params = {
|
|
2990
3532
|
onDelete: on_delete,
|
|
2991
3533
|
newKey: new_key,
|
|
2992
3534
|
}
|
|
2993
|
-
|
|
3535
|
+
|
|
2994
3536
|
api_headers = {
|
|
2995
3537
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2996
3538
|
"content-type": 'application/json',
|
|
@@ -3004,7 +3546,6 @@ module Appwrite
|
|
|
3004
3546
|
params: api_params,
|
|
3005
3547
|
response_type: Models::ColumnRelationship
|
|
3006
3548
|
)
|
|
3007
|
-
|
|
3008
3549
|
end
|
|
3009
3550
|
|
|
3010
3551
|
# List indexes on the table.
|
|
@@ -3015,24 +3556,29 @@ module Appwrite
|
|
|
3015
3556
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
3016
3557
|
#
|
|
3017
3558
|
# @return [ColumnIndexList]
|
|
3018
|
-
def list_indexes(
|
|
3559
|
+
def list_indexes(
|
|
3560
|
+
database_id:,
|
|
3561
|
+
table_id:,
|
|
3562
|
+
queries: nil,
|
|
3563
|
+
total: nil
|
|
3564
|
+
)
|
|
3019
3565
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/indexes'
|
|
3020
3566
|
.gsub('{databaseId}', database_id)
|
|
3021
3567
|
.gsub('{tableId}', table_id)
|
|
3022
3568
|
|
|
3023
3569
|
if database_id.nil?
|
|
3024
|
-
|
|
3570
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3025
3571
|
end
|
|
3026
3572
|
|
|
3027
3573
|
if table_id.nil?
|
|
3028
|
-
|
|
3574
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3029
3575
|
end
|
|
3030
3576
|
|
|
3031
3577
|
api_params = {
|
|
3032
3578
|
queries: queries,
|
|
3033
3579
|
total: total,
|
|
3034
3580
|
}
|
|
3035
|
-
|
|
3581
|
+
|
|
3036
3582
|
api_headers = {
|
|
3037
3583
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3038
3584
|
"accept": 'application/json',
|
|
@@ -3045,7 +3591,6 @@ module Appwrite
|
|
|
3045
3591
|
params: api_params,
|
|
3046
3592
|
response_type: Models::ColumnIndexList
|
|
3047
3593
|
)
|
|
3048
|
-
|
|
3049
3594
|
end
|
|
3050
3595
|
|
|
3051
3596
|
# Creates an index on the columns listed. Your index should include all the
|
|
@@ -3061,29 +3606,37 @@ module Appwrite
|
|
|
3061
3606
|
# @param [Array] lengths Length of index. Maximum of 100
|
|
3062
3607
|
#
|
|
3063
3608
|
# @return [ColumnIndex]
|
|
3064
|
-
def create_index(
|
|
3609
|
+
def create_index(
|
|
3610
|
+
database_id:,
|
|
3611
|
+
table_id:,
|
|
3612
|
+
key:,
|
|
3613
|
+
type:,
|
|
3614
|
+
columns:,
|
|
3615
|
+
orders: nil,
|
|
3616
|
+
lengths: nil
|
|
3617
|
+
)
|
|
3065
3618
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/indexes'
|
|
3066
3619
|
.gsub('{databaseId}', database_id)
|
|
3067
3620
|
.gsub('{tableId}', table_id)
|
|
3068
3621
|
|
|
3069
3622
|
if database_id.nil?
|
|
3070
|
-
|
|
3623
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3071
3624
|
end
|
|
3072
3625
|
|
|
3073
3626
|
if table_id.nil?
|
|
3074
|
-
|
|
3627
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3075
3628
|
end
|
|
3076
3629
|
|
|
3077
3630
|
if key.nil?
|
|
3078
|
-
|
|
3631
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3079
3632
|
end
|
|
3080
3633
|
|
|
3081
3634
|
if type.nil?
|
|
3082
|
-
|
|
3635
|
+
raise Appwrite::Exception.new('Missing required parameter: "type"')
|
|
3083
3636
|
end
|
|
3084
3637
|
|
|
3085
3638
|
if columns.nil?
|
|
3086
|
-
|
|
3639
|
+
raise Appwrite::Exception.new('Missing required parameter: "columns"')
|
|
3087
3640
|
end
|
|
3088
3641
|
|
|
3089
3642
|
api_params = {
|
|
@@ -3093,7 +3646,7 @@ module Appwrite
|
|
|
3093
3646
|
orders: orders,
|
|
3094
3647
|
lengths: lengths,
|
|
3095
3648
|
}
|
|
3096
|
-
|
|
3649
|
+
|
|
3097
3650
|
api_headers = {
|
|
3098
3651
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3099
3652
|
"content-type": 'application/json',
|
|
@@ -3107,7 +3660,6 @@ module Appwrite
|
|
|
3107
3660
|
params: api_params,
|
|
3108
3661
|
response_type: Models::ColumnIndex
|
|
3109
3662
|
)
|
|
3110
|
-
|
|
3111
3663
|
end
|
|
3112
3664
|
|
|
3113
3665
|
# Get index by ID.
|
|
@@ -3117,27 +3669,30 @@ module Appwrite
|
|
|
3117
3669
|
# @param [String] key Index Key.
|
|
3118
3670
|
#
|
|
3119
3671
|
# @return [ColumnIndex]
|
|
3120
|
-
def get_index(
|
|
3672
|
+
def get_index(
|
|
3673
|
+
database_id:,
|
|
3674
|
+
table_id:,
|
|
3675
|
+
key:
|
|
3676
|
+
)
|
|
3121
3677
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'
|
|
3122
3678
|
.gsub('{databaseId}', database_id)
|
|
3123
3679
|
.gsub('{tableId}', table_id)
|
|
3124
3680
|
.gsub('{key}', key)
|
|
3125
3681
|
|
|
3126
3682
|
if database_id.nil?
|
|
3127
|
-
|
|
3683
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3128
3684
|
end
|
|
3129
3685
|
|
|
3130
3686
|
if table_id.nil?
|
|
3131
|
-
|
|
3687
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3132
3688
|
end
|
|
3133
3689
|
|
|
3134
3690
|
if key.nil?
|
|
3135
|
-
|
|
3691
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3136
3692
|
end
|
|
3137
3693
|
|
|
3138
|
-
api_params = {
|
|
3139
|
-
|
|
3140
|
-
|
|
3694
|
+
api_params = {}
|
|
3695
|
+
|
|
3141
3696
|
api_headers = {
|
|
3142
3697
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3143
3698
|
"accept": 'application/json',
|
|
@@ -3150,7 +3705,6 @@ module Appwrite
|
|
|
3150
3705
|
params: api_params,
|
|
3151
3706
|
response_type: Models::ColumnIndex
|
|
3152
3707
|
)
|
|
3153
|
-
|
|
3154
3708
|
end
|
|
3155
3709
|
|
|
3156
3710
|
# Delete an index.
|
|
@@ -3160,27 +3714,30 @@ module Appwrite
|
|
|
3160
3714
|
# @param [String] key Index Key.
|
|
3161
3715
|
#
|
|
3162
3716
|
# @return []
|
|
3163
|
-
def delete_index(
|
|
3717
|
+
def delete_index(
|
|
3718
|
+
database_id:,
|
|
3719
|
+
table_id:,
|
|
3720
|
+
key:
|
|
3721
|
+
)
|
|
3164
3722
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/indexes/{key}'
|
|
3165
3723
|
.gsub('{databaseId}', database_id)
|
|
3166
3724
|
.gsub('{tableId}', table_id)
|
|
3167
3725
|
.gsub('{key}', key)
|
|
3168
3726
|
|
|
3169
3727
|
if database_id.nil?
|
|
3170
|
-
|
|
3728
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3171
3729
|
end
|
|
3172
3730
|
|
|
3173
3731
|
if table_id.nil?
|
|
3174
|
-
|
|
3732
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3175
3733
|
end
|
|
3176
3734
|
|
|
3177
3735
|
if key.nil?
|
|
3178
|
-
|
|
3736
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3179
3737
|
end
|
|
3180
3738
|
|
|
3181
|
-
api_params = {
|
|
3182
|
-
|
|
3183
|
-
|
|
3739
|
+
api_params = {}
|
|
3740
|
+
|
|
3184
3741
|
api_headers = {
|
|
3185
3742
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3186
3743
|
"content-type": 'application/json',
|
|
@@ -3192,10 +3749,9 @@ module Appwrite
|
|
|
3192
3749
|
headers: api_headers,
|
|
3193
3750
|
params: api_params,
|
|
3194
3751
|
)
|
|
3195
|
-
|
|
3196
3752
|
end
|
|
3197
3753
|
|
|
3198
|
-
# Get a list of all the user
|
|
3754
|
+
# Get a list of all the user's rows in a given table. You can use the query
|
|
3199
3755
|
# params to filter your results.
|
|
3200
3756
|
#
|
|
3201
3757
|
# @param [String] database_id Database ID.
|
|
@@ -3206,17 +3762,24 @@ module Appwrite
|
|
|
3206
3762
|
# @param [Integer] ttl TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
|
|
3207
3763
|
#
|
|
3208
3764
|
# @return [RowList]
|
|
3209
|
-
def list_rows(
|
|
3765
|
+
def list_rows(
|
|
3766
|
+
database_id:,
|
|
3767
|
+
table_id:,
|
|
3768
|
+
queries: nil,
|
|
3769
|
+
transaction_id: nil,
|
|
3770
|
+
total: nil,
|
|
3771
|
+
ttl: nil
|
|
3772
|
+
)
|
|
3210
3773
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
|
|
3211
3774
|
.gsub('{databaseId}', database_id)
|
|
3212
3775
|
.gsub('{tableId}', table_id)
|
|
3213
3776
|
|
|
3214
3777
|
if database_id.nil?
|
|
3215
|
-
|
|
3778
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3216
3779
|
end
|
|
3217
3780
|
|
|
3218
3781
|
if table_id.nil?
|
|
3219
|
-
|
|
3782
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3220
3783
|
end
|
|
3221
3784
|
|
|
3222
3785
|
api_params = {
|
|
@@ -3225,7 +3788,7 @@ module Appwrite
|
|
|
3225
3788
|
total: total,
|
|
3226
3789
|
ttl: ttl,
|
|
3227
3790
|
}
|
|
3228
|
-
|
|
3791
|
+
|
|
3229
3792
|
api_headers = {
|
|
3230
3793
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3231
3794
|
"accept": 'application/json',
|
|
@@ -3238,7 +3801,6 @@ module Appwrite
|
|
|
3238
3801
|
params: api_params,
|
|
3239
3802
|
response_type: Models::RowList
|
|
3240
3803
|
)
|
|
3241
|
-
|
|
3242
3804
|
end
|
|
3243
3805
|
|
|
3244
3806
|
# Create a new Row. Before using this route, you should create a new table
|
|
@@ -3248,31 +3810,38 @@ module Appwrite
|
|
|
3248
3810
|
#
|
|
3249
3811
|
# @param [String] database_id Database ID.
|
|
3250
3812
|
# @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
|
|
3251
|
-
# @param [String] row_id Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can
|
|
3813
|
+
# @param [String] row_id Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
3252
3814
|
# @param [Hash] data Row data as JSON object.
|
|
3253
3815
|
# @param [Array] permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
3254
3816
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3255
3817
|
#
|
|
3256
3818
|
# @return [Row]
|
|
3257
|
-
def create_row(
|
|
3819
|
+
def create_row(
|
|
3820
|
+
database_id:,
|
|
3821
|
+
table_id:,
|
|
3822
|
+
row_id:,
|
|
3823
|
+
data:,
|
|
3824
|
+
permissions: nil,
|
|
3825
|
+
transaction_id: nil
|
|
3826
|
+
)
|
|
3258
3827
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
|
|
3259
3828
|
.gsub('{databaseId}', database_id)
|
|
3260
3829
|
.gsub('{tableId}', table_id)
|
|
3261
3830
|
|
|
3262
3831
|
if database_id.nil?
|
|
3263
|
-
|
|
3832
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3264
3833
|
end
|
|
3265
3834
|
|
|
3266
3835
|
if table_id.nil?
|
|
3267
|
-
|
|
3836
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3268
3837
|
end
|
|
3269
3838
|
|
|
3270
3839
|
if row_id.nil?
|
|
3271
|
-
|
|
3840
|
+
raise Appwrite::Exception.new('Missing required parameter: "rowId"')
|
|
3272
3841
|
end
|
|
3273
3842
|
|
|
3274
3843
|
if data.nil?
|
|
3275
|
-
|
|
3844
|
+
raise Appwrite::Exception.new('Missing required parameter: "data"')
|
|
3276
3845
|
end
|
|
3277
3846
|
|
|
3278
3847
|
api_params = {
|
|
@@ -3281,7 +3850,7 @@ module Appwrite
|
|
|
3281
3850
|
permissions: permissions,
|
|
3282
3851
|
transactionId: transaction_id,
|
|
3283
3852
|
}
|
|
3284
|
-
|
|
3853
|
+
|
|
3285
3854
|
api_headers = {
|
|
3286
3855
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3287
3856
|
"content-type": 'application/json',
|
|
@@ -3295,7 +3864,6 @@ module Appwrite
|
|
|
3295
3864
|
params: api_params,
|
|
3296
3865
|
response_type: Models::Row
|
|
3297
3866
|
)
|
|
3298
|
-
|
|
3299
3867
|
end
|
|
3300
3868
|
|
|
3301
3869
|
# Create new Rows. Before using this route, you should create a new table
|
|
@@ -3309,28 +3877,33 @@ module Appwrite
|
|
|
3309
3877
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3310
3878
|
#
|
|
3311
3879
|
# @return [RowList]
|
|
3312
|
-
def create_rows(
|
|
3880
|
+
def create_rows(
|
|
3881
|
+
database_id:,
|
|
3882
|
+
table_id:,
|
|
3883
|
+
rows:,
|
|
3884
|
+
transaction_id: nil
|
|
3885
|
+
)
|
|
3313
3886
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
|
|
3314
3887
|
.gsub('{databaseId}', database_id)
|
|
3315
3888
|
.gsub('{tableId}', table_id)
|
|
3316
3889
|
|
|
3317
3890
|
if database_id.nil?
|
|
3318
|
-
|
|
3891
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3319
3892
|
end
|
|
3320
3893
|
|
|
3321
3894
|
if table_id.nil?
|
|
3322
|
-
|
|
3895
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3323
3896
|
end
|
|
3324
3897
|
|
|
3325
3898
|
if rows.nil?
|
|
3326
|
-
|
|
3899
|
+
raise Appwrite::Exception.new('Missing required parameter: "rows"')
|
|
3327
3900
|
end
|
|
3328
3901
|
|
|
3329
3902
|
api_params = {
|
|
3330
3903
|
rows: rows,
|
|
3331
3904
|
transactionId: transaction_id,
|
|
3332
3905
|
}
|
|
3333
|
-
|
|
3906
|
+
|
|
3334
3907
|
api_headers = {
|
|
3335
3908
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3336
3909
|
"content-type": 'application/json',
|
|
@@ -3344,14 +3917,13 @@ module Appwrite
|
|
|
3344
3917
|
params: api_params,
|
|
3345
3918
|
response_type: Models::RowList
|
|
3346
3919
|
)
|
|
3347
|
-
|
|
3348
3920
|
end
|
|
3349
3921
|
|
|
3350
3922
|
# Create or update Rows. Before using this route, you should create a new
|
|
3351
3923
|
# table resource using either a [server
|
|
3352
3924
|
# integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable)
|
|
3353
3925
|
# API or directly from your database console.
|
|
3354
|
-
#
|
|
3926
|
+
#
|
|
3355
3927
|
#
|
|
3356
3928
|
# @param [String] database_id Database ID.
|
|
3357
3929
|
# @param [String] table_id Table ID.
|
|
@@ -3359,28 +3931,33 @@ module Appwrite
|
|
|
3359
3931
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3360
3932
|
#
|
|
3361
3933
|
# @return [RowList]
|
|
3362
|
-
def upsert_rows(
|
|
3934
|
+
def upsert_rows(
|
|
3935
|
+
database_id:,
|
|
3936
|
+
table_id:,
|
|
3937
|
+
rows:,
|
|
3938
|
+
transaction_id: nil
|
|
3939
|
+
)
|
|
3363
3940
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
|
|
3364
3941
|
.gsub('{databaseId}', database_id)
|
|
3365
3942
|
.gsub('{tableId}', table_id)
|
|
3366
3943
|
|
|
3367
3944
|
if database_id.nil?
|
|
3368
|
-
|
|
3945
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3369
3946
|
end
|
|
3370
3947
|
|
|
3371
3948
|
if table_id.nil?
|
|
3372
|
-
|
|
3949
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3373
3950
|
end
|
|
3374
3951
|
|
|
3375
3952
|
if rows.nil?
|
|
3376
|
-
|
|
3953
|
+
raise Appwrite::Exception.new('Missing required parameter: "rows"')
|
|
3377
3954
|
end
|
|
3378
3955
|
|
|
3379
3956
|
api_params = {
|
|
3380
3957
|
rows: rows,
|
|
3381
3958
|
transactionId: transaction_id,
|
|
3382
3959
|
}
|
|
3383
|
-
|
|
3960
|
+
|
|
3384
3961
|
api_headers = {
|
|
3385
3962
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3386
3963
|
"content-type": 'application/json',
|
|
@@ -3394,7 +3971,6 @@ module Appwrite
|
|
|
3394
3971
|
params: api_params,
|
|
3395
3972
|
response_type: Models::RowList
|
|
3396
3973
|
)
|
|
3397
|
-
|
|
3398
3974
|
end
|
|
3399
3975
|
|
|
3400
3976
|
# Update all rows that match your queries, if no queries are submitted then
|
|
@@ -3407,17 +3983,23 @@ module Appwrite
|
|
|
3407
3983
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3408
3984
|
#
|
|
3409
3985
|
# @return [RowList]
|
|
3410
|
-
def update_rows(
|
|
3986
|
+
def update_rows(
|
|
3987
|
+
database_id:,
|
|
3988
|
+
table_id:,
|
|
3989
|
+
data: nil,
|
|
3990
|
+
queries: nil,
|
|
3991
|
+
transaction_id: nil
|
|
3992
|
+
)
|
|
3411
3993
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
|
|
3412
3994
|
.gsub('{databaseId}', database_id)
|
|
3413
3995
|
.gsub('{tableId}', table_id)
|
|
3414
3996
|
|
|
3415
3997
|
if database_id.nil?
|
|
3416
|
-
|
|
3998
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3417
3999
|
end
|
|
3418
4000
|
|
|
3419
4001
|
if table_id.nil?
|
|
3420
|
-
|
|
4002
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3421
4003
|
end
|
|
3422
4004
|
|
|
3423
4005
|
api_params = {
|
|
@@ -3425,7 +4007,7 @@ module Appwrite
|
|
|
3425
4007
|
queries: queries,
|
|
3426
4008
|
transactionId: transaction_id,
|
|
3427
4009
|
}
|
|
3428
|
-
|
|
4010
|
+
|
|
3429
4011
|
api_headers = {
|
|
3430
4012
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3431
4013
|
"content-type": 'application/json',
|
|
@@ -3439,7 +4021,6 @@ module Appwrite
|
|
|
3439
4021
|
params: api_params,
|
|
3440
4022
|
response_type: Models::RowList
|
|
3441
4023
|
)
|
|
3442
|
-
|
|
3443
4024
|
end
|
|
3444
4025
|
|
|
3445
4026
|
# Bulk delete rows using queries, if no queries are passed then all rows are
|
|
@@ -3451,24 +4032,29 @@ module Appwrite
|
|
|
3451
4032
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3452
4033
|
#
|
|
3453
4034
|
# @return [RowList]
|
|
3454
|
-
def delete_rows(
|
|
4035
|
+
def delete_rows(
|
|
4036
|
+
database_id:,
|
|
4037
|
+
table_id:,
|
|
4038
|
+
queries: nil,
|
|
4039
|
+
transaction_id: nil
|
|
4040
|
+
)
|
|
3455
4041
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
|
|
3456
4042
|
.gsub('{databaseId}', database_id)
|
|
3457
4043
|
.gsub('{tableId}', table_id)
|
|
3458
4044
|
|
|
3459
4045
|
if database_id.nil?
|
|
3460
|
-
|
|
4046
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3461
4047
|
end
|
|
3462
4048
|
|
|
3463
4049
|
if table_id.nil?
|
|
3464
|
-
|
|
4050
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3465
4051
|
end
|
|
3466
4052
|
|
|
3467
4053
|
api_params = {
|
|
3468
4054
|
queries: queries,
|
|
3469
4055
|
transactionId: transaction_id,
|
|
3470
4056
|
}
|
|
3471
|
-
|
|
4057
|
+
|
|
3472
4058
|
api_headers = {
|
|
3473
4059
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3474
4060
|
"content-type": 'application/json',
|
|
@@ -3482,7 +4068,6 @@ module Appwrite
|
|
|
3482
4068
|
params: api_params,
|
|
3483
4069
|
response_type: Models::RowList
|
|
3484
4070
|
)
|
|
3485
|
-
|
|
3486
4071
|
end
|
|
3487
4072
|
|
|
3488
4073
|
# Get a row by its unique ID. This endpoint response returns a JSON object
|
|
@@ -3495,29 +4080,35 @@ module Appwrite
|
|
|
3495
4080
|
# @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
|
|
3496
4081
|
#
|
|
3497
4082
|
# @return [Row]
|
|
3498
|
-
def get_row(
|
|
4083
|
+
def get_row(
|
|
4084
|
+
database_id:,
|
|
4085
|
+
table_id:,
|
|
4086
|
+
row_id:,
|
|
4087
|
+
queries: nil,
|
|
4088
|
+
transaction_id: nil
|
|
4089
|
+
)
|
|
3499
4090
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'
|
|
3500
4091
|
.gsub('{databaseId}', database_id)
|
|
3501
4092
|
.gsub('{tableId}', table_id)
|
|
3502
4093
|
.gsub('{rowId}', row_id)
|
|
3503
4094
|
|
|
3504
4095
|
if database_id.nil?
|
|
3505
|
-
|
|
4096
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3506
4097
|
end
|
|
3507
4098
|
|
|
3508
4099
|
if table_id.nil?
|
|
3509
|
-
|
|
4100
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3510
4101
|
end
|
|
3511
4102
|
|
|
3512
4103
|
if row_id.nil?
|
|
3513
|
-
|
|
4104
|
+
raise Appwrite::Exception.new('Missing required parameter: "rowId"')
|
|
3514
4105
|
end
|
|
3515
4106
|
|
|
3516
4107
|
api_params = {
|
|
3517
4108
|
queries: queries,
|
|
3518
4109
|
transactionId: transaction_id,
|
|
3519
4110
|
}
|
|
3520
|
-
|
|
4111
|
+
|
|
3521
4112
|
api_headers = {
|
|
3522
4113
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3523
4114
|
"accept": 'application/json',
|
|
@@ -3530,7 +4121,6 @@ module Appwrite
|
|
|
3530
4121
|
params: api_params,
|
|
3531
4122
|
response_type: Models::Row
|
|
3532
4123
|
)
|
|
3533
|
-
|
|
3534
4124
|
end
|
|
3535
4125
|
|
|
3536
4126
|
# Create or update a Row. Before using this route, you should create a new
|
|
@@ -3546,22 +4136,29 @@ module Appwrite
|
|
|
3546
4136
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3547
4137
|
#
|
|
3548
4138
|
# @return [Row]
|
|
3549
|
-
def upsert_row(
|
|
4139
|
+
def upsert_row(
|
|
4140
|
+
database_id:,
|
|
4141
|
+
table_id:,
|
|
4142
|
+
row_id:,
|
|
4143
|
+
data: nil,
|
|
4144
|
+
permissions: nil,
|
|
4145
|
+
transaction_id: nil
|
|
4146
|
+
)
|
|
3550
4147
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'
|
|
3551
4148
|
.gsub('{databaseId}', database_id)
|
|
3552
4149
|
.gsub('{tableId}', table_id)
|
|
3553
4150
|
.gsub('{rowId}', row_id)
|
|
3554
4151
|
|
|
3555
4152
|
if database_id.nil?
|
|
3556
|
-
|
|
4153
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3557
4154
|
end
|
|
3558
4155
|
|
|
3559
4156
|
if table_id.nil?
|
|
3560
|
-
|
|
4157
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3561
4158
|
end
|
|
3562
4159
|
|
|
3563
4160
|
if row_id.nil?
|
|
3564
|
-
|
|
4161
|
+
raise Appwrite::Exception.new('Missing required parameter: "rowId"')
|
|
3565
4162
|
end
|
|
3566
4163
|
|
|
3567
4164
|
api_params = {
|
|
@@ -3569,7 +4166,7 @@ module Appwrite
|
|
|
3569
4166
|
permissions: permissions,
|
|
3570
4167
|
transactionId: transaction_id,
|
|
3571
4168
|
}
|
|
3572
|
-
|
|
4169
|
+
|
|
3573
4170
|
api_headers = {
|
|
3574
4171
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3575
4172
|
"content-type": 'application/json',
|
|
@@ -3583,7 +4180,6 @@ module Appwrite
|
|
|
3583
4180
|
params: api_params,
|
|
3584
4181
|
response_type: Models::Row
|
|
3585
4182
|
)
|
|
3586
|
-
|
|
3587
4183
|
end
|
|
3588
4184
|
|
|
3589
4185
|
# Update a row by its unique ID. Using the patch method you can pass only
|
|
@@ -3597,22 +4193,29 @@ module Appwrite
|
|
|
3597
4193
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3598
4194
|
#
|
|
3599
4195
|
# @return [Row]
|
|
3600
|
-
def update_row(
|
|
4196
|
+
def update_row(
|
|
4197
|
+
database_id:,
|
|
4198
|
+
table_id:,
|
|
4199
|
+
row_id:,
|
|
4200
|
+
data: nil,
|
|
4201
|
+
permissions: nil,
|
|
4202
|
+
transaction_id: nil
|
|
4203
|
+
)
|
|
3601
4204
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'
|
|
3602
4205
|
.gsub('{databaseId}', database_id)
|
|
3603
4206
|
.gsub('{tableId}', table_id)
|
|
3604
4207
|
.gsub('{rowId}', row_id)
|
|
3605
4208
|
|
|
3606
4209
|
if database_id.nil?
|
|
3607
|
-
|
|
4210
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3608
4211
|
end
|
|
3609
4212
|
|
|
3610
4213
|
if table_id.nil?
|
|
3611
|
-
|
|
4214
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3612
4215
|
end
|
|
3613
4216
|
|
|
3614
4217
|
if row_id.nil?
|
|
3615
|
-
|
|
4218
|
+
raise Appwrite::Exception.new('Missing required parameter: "rowId"')
|
|
3616
4219
|
end
|
|
3617
4220
|
|
|
3618
4221
|
api_params = {
|
|
@@ -3620,7 +4223,7 @@ module Appwrite
|
|
|
3620
4223
|
permissions: permissions,
|
|
3621
4224
|
transactionId: transaction_id,
|
|
3622
4225
|
}
|
|
3623
|
-
|
|
4226
|
+
|
|
3624
4227
|
api_headers = {
|
|
3625
4228
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3626
4229
|
"content-type": 'application/json',
|
|
@@ -3634,7 +4237,6 @@ module Appwrite
|
|
|
3634
4237
|
params: api_params,
|
|
3635
4238
|
response_type: Models::Row
|
|
3636
4239
|
)
|
|
3637
|
-
|
|
3638
4240
|
end
|
|
3639
4241
|
|
|
3640
4242
|
# Delete a row by its unique ID.
|
|
@@ -3645,28 +4247,33 @@ module Appwrite
|
|
|
3645
4247
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3646
4248
|
#
|
|
3647
4249
|
# @return []
|
|
3648
|
-
def delete_row(
|
|
4250
|
+
def delete_row(
|
|
4251
|
+
database_id:,
|
|
4252
|
+
table_id:,
|
|
4253
|
+
row_id:,
|
|
4254
|
+
transaction_id: nil
|
|
4255
|
+
)
|
|
3649
4256
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'
|
|
3650
4257
|
.gsub('{databaseId}', database_id)
|
|
3651
4258
|
.gsub('{tableId}', table_id)
|
|
3652
4259
|
.gsub('{rowId}', row_id)
|
|
3653
4260
|
|
|
3654
4261
|
if database_id.nil?
|
|
3655
|
-
|
|
4262
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3656
4263
|
end
|
|
3657
4264
|
|
|
3658
4265
|
if table_id.nil?
|
|
3659
|
-
|
|
4266
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3660
4267
|
end
|
|
3661
4268
|
|
|
3662
4269
|
if row_id.nil?
|
|
3663
|
-
|
|
4270
|
+
raise Appwrite::Exception.new('Missing required parameter: "rowId"')
|
|
3664
4271
|
end
|
|
3665
4272
|
|
|
3666
4273
|
api_params = {
|
|
3667
4274
|
transactionId: transaction_id,
|
|
3668
4275
|
}
|
|
3669
|
-
|
|
4276
|
+
|
|
3670
4277
|
api_headers = {
|
|
3671
4278
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3672
4279
|
"content-type": 'application/json',
|
|
@@ -3678,7 +4285,6 @@ module Appwrite
|
|
|
3678
4285
|
headers: api_headers,
|
|
3679
4286
|
params: api_params,
|
|
3680
4287
|
)
|
|
3681
|
-
|
|
3682
4288
|
end
|
|
3683
4289
|
|
|
3684
4290
|
# Decrement a specific column of a row by a given value.
|
|
@@ -3692,7 +4298,15 @@ module Appwrite
|
|
|
3692
4298
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3693
4299
|
#
|
|
3694
4300
|
# @return [Row]
|
|
3695
|
-
def decrement_row_column(
|
|
4301
|
+
def decrement_row_column(
|
|
4302
|
+
database_id:,
|
|
4303
|
+
table_id:,
|
|
4304
|
+
row_id:,
|
|
4305
|
+
column:,
|
|
4306
|
+
value: nil,
|
|
4307
|
+
min: nil,
|
|
4308
|
+
transaction_id: nil
|
|
4309
|
+
)
|
|
3696
4310
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement'
|
|
3697
4311
|
.gsub('{databaseId}', database_id)
|
|
3698
4312
|
.gsub('{tableId}', table_id)
|
|
@@ -3700,19 +4314,19 @@ module Appwrite
|
|
|
3700
4314
|
.gsub('{column}', column)
|
|
3701
4315
|
|
|
3702
4316
|
if database_id.nil?
|
|
3703
|
-
|
|
4317
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3704
4318
|
end
|
|
3705
4319
|
|
|
3706
4320
|
if table_id.nil?
|
|
3707
|
-
|
|
4321
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3708
4322
|
end
|
|
3709
4323
|
|
|
3710
4324
|
if row_id.nil?
|
|
3711
|
-
|
|
4325
|
+
raise Appwrite::Exception.new('Missing required parameter: "rowId"')
|
|
3712
4326
|
end
|
|
3713
4327
|
|
|
3714
4328
|
if column.nil?
|
|
3715
|
-
|
|
4329
|
+
raise Appwrite::Exception.new('Missing required parameter: "column"')
|
|
3716
4330
|
end
|
|
3717
4331
|
|
|
3718
4332
|
api_params = {
|
|
@@ -3720,7 +4334,7 @@ module Appwrite
|
|
|
3720
4334
|
min: min,
|
|
3721
4335
|
transactionId: transaction_id,
|
|
3722
4336
|
}
|
|
3723
|
-
|
|
4337
|
+
|
|
3724
4338
|
api_headers = {
|
|
3725
4339
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3726
4340
|
"content-type": 'application/json',
|
|
@@ -3734,7 +4348,6 @@ module Appwrite
|
|
|
3734
4348
|
params: api_params,
|
|
3735
4349
|
response_type: Models::Row
|
|
3736
4350
|
)
|
|
3737
|
-
|
|
3738
4351
|
end
|
|
3739
4352
|
|
|
3740
4353
|
# Increment a specific column of a row by a given value.
|
|
@@ -3748,7 +4361,15 @@ module Appwrite
|
|
|
3748
4361
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3749
4362
|
#
|
|
3750
4363
|
# @return [Row]
|
|
3751
|
-
def increment_row_column(
|
|
4364
|
+
def increment_row_column(
|
|
4365
|
+
database_id:,
|
|
4366
|
+
table_id:,
|
|
4367
|
+
row_id:,
|
|
4368
|
+
column:,
|
|
4369
|
+
value: nil,
|
|
4370
|
+
max: nil,
|
|
4371
|
+
transaction_id: nil
|
|
4372
|
+
)
|
|
3752
4373
|
api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment'
|
|
3753
4374
|
.gsub('{databaseId}', database_id)
|
|
3754
4375
|
.gsub('{tableId}', table_id)
|
|
@@ -3756,19 +4377,19 @@ module Appwrite
|
|
|
3756
4377
|
.gsub('{column}', column)
|
|
3757
4378
|
|
|
3758
4379
|
if database_id.nil?
|
|
3759
|
-
|
|
4380
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3760
4381
|
end
|
|
3761
4382
|
|
|
3762
4383
|
if table_id.nil?
|
|
3763
|
-
|
|
4384
|
+
raise Appwrite::Exception.new('Missing required parameter: "tableId"')
|
|
3764
4385
|
end
|
|
3765
4386
|
|
|
3766
4387
|
if row_id.nil?
|
|
3767
|
-
|
|
4388
|
+
raise Appwrite::Exception.new('Missing required parameter: "rowId"')
|
|
3768
4389
|
end
|
|
3769
4390
|
|
|
3770
4391
|
if column.nil?
|
|
3771
|
-
|
|
4392
|
+
raise Appwrite::Exception.new('Missing required parameter: "column"')
|
|
3772
4393
|
end
|
|
3773
4394
|
|
|
3774
4395
|
api_params = {
|
|
@@ -3776,7 +4397,7 @@ module Appwrite
|
|
|
3776
4397
|
max: max,
|
|
3777
4398
|
transactionId: transaction_id,
|
|
3778
4399
|
}
|
|
3779
|
-
|
|
4400
|
+
|
|
3780
4401
|
api_headers = {
|
|
3781
4402
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3782
4403
|
"content-type": 'application/json',
|
|
@@ -3790,8 +4411,6 @@ module Appwrite
|
|
|
3790
4411
|
params: api_params,
|
|
3791
4412
|
response_type: Models::Row
|
|
3792
4413
|
)
|
|
3793
|
-
|
|
3794
4414
|
end
|
|
3795
|
-
|
|
3796
|
-
end
|
|
4415
|
+
end
|
|
3797
4416
|
end
|