📄️ Introduction to Collect SDK
Welcome to the comprehensive guide on working with the Collect SDK. This section provides an overview of initializing the Collect SDK, a crucial first step for integrating Collect into your applications. Understanding the initialization process is key to effectively manage and interact with your data through Collect.
📄️ Defining Models with Collect SDK
In this section, we focus on how to define models using the Collect SDK. Defining models accurately is crucial as it not only aids in validating the fields according to the schema but also enhances the developer experience with features like autocomplete and field name suggestions.
📄️ Transactions
Transactions are a powerful feature in the Collect SDK that allow you to bundle multiple operations into a single, atomic unit. This ensures that all operations within the transaction either succeed or fail together, maintaining data integrity and consistency.
📄️ Creating Records
Creating records is a fundamental operation when working with any data-driven application. The CollectModel class provides methods to create single or multiple records in the database.
📄️ Reading Records
Reading records involves fetching data from the database. The CollectModel class provides several methods to retrieve records based on different criteria..
📄️ Updating Records
Updating records is a crucial operation for maintaining and modifying data within your application. The CollectModel class provides methods to update single or multiple records. We will use the Author and Post models defined earlier to demonstrate these operations.
📄️ Deleting Records
Deleting records is a fundamental operation to manage the lifecycle of data within your application. The CollectModel class provides methods to delete multiple records. We will use the Author and Post models defined earlier to demonstrate these operations.
📄️ Relations
In most cases, our records do not exist independently and separately but are interconnected. The Collect SDK provides a way to define relationships between records and perform powerful queries that take these relationships into account. Linking records in Collect SDK allows you to establish these relationships, creating complex data structures where entities are interconnected. The methods .attach() and .detach() are used to manage these relationships.
📄️ Querying Data
In previous sections, you have encountered the where condition and various logical operators like $AND and $XOR. This section provides a comprehensive guide on querying data using the CollectQuery type, covering all available logical and comparison operators.
📄️ Enhanced TypeScript Support
When working with CollectSDK, achieving perfect TypeScript contracts ensures a seamless development experience. TypeScript's strong typing system allows for precise autocomplete suggestions and error checking, particularly when dealing with complex queries and nested models. This section will guide you on how to enhance TypeScript support by defining comprehensive type definitions for your models.
🗃️ Typescript reference
10 items
🗃️ Advanced usage
3 items