Home

Welcome to the Google Apps Script CRUD Class for Google Sheets documentation.

πŸ“Š Google Apps Script CRUD for Google Sheets (GAS-DB)

Welcome to the Google Apps Script CRUD Class for Google Sheets! This library simplifies managing your Google Sheets as databases, allowing you to perform Create, Read, Update, and Delete (CRUD) operations with ease. Whether you're building a CRM, inventory system, or any data-driven application, this library has got you covered! πŸš€

🌟 Features

  • ✨ CRUD Operations: Seamlessly Create, Read, Update, and Delete records in Google Sheets.
  • πŸ“œ History Tracking: Automatically track deletions with history tables.
  • πŸ” Sorting & Pagination: Easily sort and paginate your data for better management.
  • βœ… Type Validation: Ensure data integrity with type checking (number, string, boolean, date).
  • πŸ“¦ New Concurrency Locks: Prevent race conditions with built-in locking mechanisms for writes and reads.
  • πŸ”— New Many-to-Many Relationship Support: Handle complex data relationships using junction tables.
  • ️ Caching: Improve performance with built-in caching.
  • 🎨 Customizable Color Schemes: Beautify your sheets with predefined color themes.
  • πŸ—ƒ New Bulk Reading: Fetch multiple records by ID in a single call.

πŸ“– Quick Start

  1. Installation
    Learn how to add this library to your Google Apps Script project.
  2. Creating Tables
    Explore how to initialize, create tables, and put them into the schema context to then perform basic CRUD ops.
  3. Caveats
    Important notes on date serialization, table headers, and more.
  4. CRUD Operations
    A detailed guide on creating, reading, updating, and deleting records.
  5. Advanced Examples
    Dive deeper into bulk reading, many-to-many relationships, and more.
  6. API Reference
    A complete breakdown of all available methods, signatures, and return structures.
  7. Full Code Samples
    Copy-paste ready examples demonstrating end-to-end flows.

πŸš€ What’s New in v1.0.0

  1. Concurrency Locks
    Locking for Create/Update/Delete operations to prevent concurrent writes on the same record.
  2. Many-to-Many Relationship Support
    Easily create and manage junction tables between two different entities.
  3. Cascade Deletion
    Remove a parent record and automatically clean up related entries in junction tables.
  4. Bulk Read
    Fetch multiple records by ID with a single call.
  5. Integrity Checks
    Validate foreign key references in your junction tables.
  6. Enhanced Logging & Debug
    Methods like createWithLogs() and updateWithLogs() for more detailed output.

Contributing

We welcome contributions! Feel free to open issues or pull requests on our GitHub repository.

If you have any questions or suggestions, reach out or file an issue. Thanks for using GAS-DB!