Show HN: Pylon Sync,一个以智能体为先的全栈实时框架
Show HN: Pylon Sync, an agent-first full-stack realtime framework

原始链接: https://www.pylonsync.com

``` // 一个实体 → 一个同步表 + 类型化客户端 const Order = entity("Order", { customer: field.string(), total: field.float(), paid: field.boolean().default(false), }); // 模式旁边的访问规则 — 默认拒绝 policy({ entity: "Order", allowRead: "auth.userId != null", allowInsert: "auth.userId == data.ownerId", }); // React 端 — 实时、类型化,无需 fetch const { data } = db.useQuery("Order"); ```

抱歉。
相关文章

原文

// one entity → a synced table + typed client

const Order = entity("Order", {

customer: field.string(),

total: field.float(),

paid: field.boolean().default(false),

});

 

// access rules next to the schema — deny by default

policy({ entity: "Order",

allowRead: "auth.userId != null",

allowInsert: "auth.userId == data.ownerId",

});

 

// the React side — live, typed, no fetch

const { data } = db.useQuery("Order");

联系我们 contact @ memedata.com