Skip to main content

2 posts tagged with "optimistic-locking"

View All Tags

Round-Trip Order Editing with Generated Q and E APIs on SQLite

· 7 min read
TeaQL Team
Core Team

An order-editing page looks ordinary: load an order, show its lines in a table, let a user change quantities or remove a line, and save the result.

The difficult part is everything hidden behind that table. The server must know which rows were actually issued, which fields were editable, whether the user is still authorized, whether the order or an individual line changed in the meantime, and whether all writes committed together. Omitting a row must not be silently interpreted as deleting it.

TeaQL now has a runnable Rust and SQLite example that proves this complete round trip with generated Q, E, and mutation APIs. It is not a mock repository or an in-memory approximation: it creates a real SQLite database, loads a generated object graph, issues a context-bound document, accepts an edited projection, and verifies the persisted result.

Blob Objects and Optimistic Locking Improvements

· One min read
TeaQL Team
Core Team

Blob object type and optimistic locking mechanism improvements.

BlobObject Type​

Store large binary data (images, documents, files):

@Entity
public class Document {
private String name;
private BlobObject content; // stores file data
}
+ BlobObject: binary data storage type
+ Integrated with SQLRepository for persistence
+ Streaming support for large files

Actual Change Detection​

Version number is only incremented when properties have actually changed, avoiding meaningless version bumps.

Multi-Entity Version Conflict Fix​

When updating multiple entities in the same transaction, each entity's version is tracked independently.