@sheetbase/tamotsux-server

Tamotsu ORM that support multiple sheets.

Usage no npm install needed!

<script type="module">
  import sheetbaseTamotsuxServer from 'https://cdn.skypack.dev/@sheetbase/tamotsux-server';
</script>

README

Sheetbase Module: @sheetbase/tamotsux-server

Tamotsu ORM that support multiple sheets.

Build Status Coverage Status NPM License clasp Support me on Patreon PayPal Ask me anything

Install

Using npm: npm install --save @sheetbase/tamotsux-server

import * as Tamotsux from "@sheetbase/tamotsux-server";

As a library: 15fzNG5GZ7Ko6ygGYsMvthZLHovrc3eI_BEwFhwciOWVsBx47WCo13wvW

Set the Indentifier to TamotsuxModule and select the lastest version, view code.

declare const TamotsuxModule: { Tamotsux: any };
const Tamotsux = TamotsuxModule.Tamotsux;

Scopes

https://www.googleapis.com/auth/spreadsheets

Usage

Examples

import * as Tamotsux from "./public_api";

const defaultSpreadsheet = SpreadsheetApp.openById(
  "1Zz5kvlTn2cXd41ZQZlFeCjvVR_XhpUnzKlDGB8QsXoI"
);

export function example1(): void {
  Tamotsux.initialize();
  const FooTable = Tamotsux.Table.define({
    sheetName: "foo",
    spreadsheet: defaultSpreadsheet
  });

  const first = FooTable.first();
  Logger.log(first);
}

export function example2(): void {
  Tamotsux.initialize(defaultSpreadsheet); // dafault
  const BarTable = Tamotsux.Table.define({ sheetName: "bar" });

  const all = BarTable.all();
  Logger.log(all);
}

License

@sheetbase/tamotsux-server is released under the MIT license.