Data Operations
HolySheets! provides a set of CRUD-like operations to interact with your Google Sheets data:
Finding Data
Inserting Data
insert: Inserts new records.
Updating Data
updateFirst: Updates the first matching record.updateMany: Updates all matching records.
Deleting Data
deleteFirst: Deletes the first matching record.deleteMany: Deletes all matching records.
Clearing Data
clearFirst: Clears the first matching record’s cell contents (row not removed).clearMany: Clears all matching records’ cell contents (rows not removed).
Public Read-Only Mode
HolySheets.public(): Query public Google Sheets without authentication using find methods only. All operations can optionally return metadata such as affected ranges and operation duration. To include metadata in your responses, pass{ includeMetadata: true }in the second parameter of any operation method.
typescript
// Example: Finding the first record named "Alice" and including metadata
const result = await holySheetsInstance.findFirst(
{
where: { name: 'Alice' }
},
{
includeMetadata: true
}
)
console.log(result.data) // The matching record
console.log(result.metadata) // Optional metadata (if requested)