Security
1. Hiding Sensitive Data
Manual Hiding
// src/config/users.ts
import { defineTable } from '@tablecraft/engine';
import { users } from '../db/schema';
export const userConfig = defineTable(users)
.hide('password', 'salt', 'resetToken') // Always excluded from SELECT *
.toConfig();Auto-Hiding (Recommended)
export const userConfig = defineTable(users)
.autoHide() // Automatically hides 'password', 'api_key', etc.
.toConfig();2. Multi-Tenancy (Tenant Isolation)
Configuration
Usage
3. Soft Deletes
Configuration
Behavior
4. Access Control (RBAC)
Configuration
Passing Context (Crucial)
Next Steps
Last updated
Was this helpful?
