メインコンテンツにスキップ

gassma

GASsma is Google Apps Script(GAS) of SpreadSheet library that can be used like prisma.

AI Summary

GASsma

Use Sheets as a DB in GAS via Prisma-like syntax

Target Users

Any-level GAS developers building internal tools needing simple persistence without a DB

Problems Solved

Need simple persistence in GAS without a DB; use Sheets as a database

Script ID

  1. In GAS Editor: Click "Libraries +" → Paste into "Script ID" field → Click "Look up"
  2. "gassma" will appear in the search results
  3. Select the latest version (highest number) from "Version" dropdown
  4. Click "Add"

Tags

Main Features
1
Prisma-like API

Operate Sheets with Prisma-like syntax as stated in the README

2
Use Sheets as DB

Treat Sheets like a database: CRUD, filtering, sorting, aggregation are supported per README

3
Easy setup

Start via npm install or by adding the provided Script ID

4
TypeScript ready

Use familiar TypeScript/JavaScript methods to work with data

5
No-DB persistence

Suited for simple persistence without a traditional database setup

Examples

Fetch data from Spreadsheet (with Clasp)

The following is based on the README example.

// Import the library
import { Gassma } from "gassma";

// Create a client
const gassma = new Gassma.GassmaClient();

// Fetch data from the Spreadsheet (findMany)
function myFunction(){
  const result = gassma.sheets.YOUR_SHEET_NAME.findMany({
    where: {
      city: "Tokyo", // filter: city equals Tokyo
      age: 22         // filter: age equals 22
    }
  });

  console.log(result); // log the retrieved records
}

Using in the GAS Script Editor

// Create a client
const gassma = new Gassma.GassmaClient();

// Fetch data from the Spreadsheet (findMany)
function myFunction(){
  const result = gassma.sheets.YOUR_SHEET_NAME.findMany({
    where: {
      city: "Tokyo", // filter: city equals Tokyo
      age: 22         // filter: age equals 22
    }
  });

  console.log(result); // log the retrieved records
}

Sample Code

Post a Sample

No sample codes for this library yet

Be the first to post a sample!

Post a Sample