neon -- aws aurora postgres 的无服务器开源替代品 简介 neon 是 aws aurora postgres 的无服务器开源替代品。它将存储和计算分开,并通过跨节点集群重新分布数据来替代 postgresql 存储层。 尝试使用 neon 免费套餐创建无服务器 postgres 实例。然后使用您首选的 postgres 客户端(psql、dbeaver 等)连接到它或使用在线 sql 编辑器。有关连接说明,请参阅从任何应用程序连接。或者,在本地编译并运行该项目。
架构概述 neon 由计算节点和 neon 存储引擎组成。计算节点是由 neon 存储引擎支持的无状态 postgresql 节点。
neon 存储引擎由两个主要组件组成: pageserver - 计算节点的可扩展存储后端。 safekeepers - safekeepers 形成一个冗余的 wal 服务,从计算节点接收 wal,并将其持久存储,直到它被 pageserver 处理并上传到云存储。
https://github.com/neondatabase/neon
rusqlite 使用 rust 的 sqlite 包装器
rusqlite 是一个使用 rust 的 sqlite 的符合人体工程学的包装器。从历史上看,该 api 是基于 rust-postgres. 然而,两者在很多方面存在分歧,并且两者之间不存在兼容性。
使用
在您的 cargo.toml 中: [dependencies] # `bundled` causes us to automatically compile and link in an up to date # version of sqlite for you. this avoids many common build issues, and # avoids depending on the version of sqlite on the users system (or your # system), which may be old or missing. it's the right choice for most # programs that control their own sqlite databases. # # that said, it's not ideal for all scenarios and in particular, generic # libraries built around `rusqlite` should probably not enable it, which # is why it is not a default feature -- it could become hard to disable. rusqlite = { version = 0.29.0, features = [bundled] }
简单示例用法: use rusqlite::{connection, result}; #[derive(debug)] struct person { id: i32, name: string, data: option
, } fn main() -> result { let conn = connection::open_in_memory()?; conn.execute( create table person ( id integer primary key, name text not null, data blob ), (), // empty list of parameters. )?; let me = person { id: 0, name: steven.to_string(), data: none, }; conn.execute( insert into person (name, data) values (?1, ?2), (&me.name, &me.data), )?; let mut stmt = conn.prepare(select id, name, data from person)?; let person_iter = stmt.query_map([], |row| { ok(person { id: row.get(0)?, name: row.get(1)?, data: row.get(2)?, }) })?; for person in person_iter { println!(found person {:?}, person.unwrap()); } ok(()) }
支持的 sqlite 版本
何为智慧工地,听小编来说智慧工地整体解决方案
浅谈射频前端的国内外现状
讲解电子灌封胶的分类和应用
中国通信业在国际学术界的崛起道路探讨
腾讯医疗新科技亮相 安全高效智慧健康描绘医疗新图景
Neon--AWS Aurora Postgres的无服务器开源替代品
IMT宣布提供8英寸晶圆MEMS加工服务
华为又一款手机被山寨机盯上
说好的不见不散?三星呢?华为P10:独孤求败,别急着高兴,这背后另有隐情
精选的开源框架与代码分享!
华为发布好望云服务,实现了“1+3+N”战略的全面布局
关于PLC故障排查的思路和方法
我国三大运营商正式启动5G承载技术标准与产业研讨会
石油化工行业智能供应链管理系统解决方案
千元高端耳机卖断货!骨传导高端战局厮杀激烈,韶音不敌南卡
iRobot发布一对新的清洁机器人,协同工作,进行吸尘、拖地和除尘
AV/AR头戴设备“拯救”智能硬件市场
苹果公布了折叠屏手机专利方案将可能在2020年底或2021年初推出
常规银行木马只单向通信,SocketPlayer感染路径
芯圣电子通用型8051单片机——HC89F03X2系列