New Projects
Use Custom API from day one for best performance and full feature access.
TerraScale provides three API access patterns. Each serves different use cases and offers different tradeoffs.
The TerraScale Custom API is the preferred method for accessing your databases. It provides:
Use this API when:
// Example: Using the Custom APIvar client = new TerraScaleDatabase(new TerraScaleDatabaseOptions{ ApiKey = "ts_live_your_api_key", Endpoint = "https://api.terrascale.io", DefaultDatabase = "my-database"});
var result = await client.PutItemAsync(new DatabaseItem{ PartitionKey = "user#123", SortKey = "profile", Attributes = new Dictionary<string, object?> { ["name"] = "John Doe", ["email"] = "john@example.com" }});A partially compatible DynamoDB API for easier migration from AWS.
Important Notes:
| Operation | Status |
|---|---|
| GetItem | Supported |
| PutItem | Supported |
| DeleteItem | Supported |
| UpdateItem | Supported |
| Query | Supported |
| Scan | Supported |
| BatchGetItem | Supported |
| BatchWriteItem | Supported |
| TransactGetItems | Supported |
| TransactWriteItems | Supported |
| Feature | Status |
|---|---|
| Global Secondary Indexes (GSI) | Not Supported |
| Local Secondary Indexes (LSI) | Not Supported |
| DynamoDB Streams | Not Supported |
| PartiQL | Not Supported |
| On-Demand/Provisioned capacity modes | Not Supported |
Use this API when:
A SQL-like interface for developers who prefer relational-style queries.
Important Notes:
-- Data Manipulation (DML)SELECT columns FROM table WHERE conditions [ORDER BY] [LIMIT]INSERT INTO table (columns) VALUES (values)UPDATE table SET assignments WHERE conditionsDELETE FROM table WHERE conditions
-- Data Definition (DDL)CREATE TABLE table (columns, PRIMARY KEY (pk [, ck...]))ALTER TABLE table ADD column typeALTER TABLE table DROP columnDROP TABLE tableCREATE INDEX name ON table (column)DROP INDEX nameUse this API when:
| Feature | Custom API | DynamoDB API | SQL API |
|---|---|---|---|
| Performance | Best | Good | Good |
| Type Safety | Full | Partial | Minimal |
| Feature Coverage | 100% | ~70% | ~40% |
| Learning Curve | Low | Medium | Low |
| Migration Path | Native | From AWS | From SQL |
| Schema Required | No | No | Yes |
| Best For | Production | Migration | Exploration |
New Projects
Use Custom API from day one for best performance and full feature access.
AWS Migration
Start with DynamoDB API, then migrate to Custom API over time.
SQL Background
Use SQL API for exploration, Custom API for production.
Start with the Custom API unless you have a specific reason to use the alternatives: