rsqlite3是使用Rust重写的sqlite3数据库。
rsqlite3使用c2rust转译器重写了sqlite3代码 ,作者也在此基础上进行了部分清理。
使用示例
$cargo+nightlybuild--release#...bunchofstuffIchoosenottounderstand/readwarning:`rsqlite3`(bin"rsqlite3")generated37warnings(24duplicates)Finishedrelease[optimized]target(s)in39.84s$./target/release/rsqlite3--Loadingresourcesfrom/home/epilys/.sqlitercSQLiteversion3.37.02021-10-1710:31:09Enter".help"forusagehints.Connectedtoatransientin-memorydatabase.Use".openFILENAME"toreopenonapersistentdatabase.sqlite>.openrrrrrruuuuuust.dbsqlite>CREATETABLEopinions(x);sqlite>insertintoopinions(x)values(hex(randomblob(16)));sqlite>insertintoopinions(x)values(hex(randomblob(16)));sqlite>insertintoopinions(x)values(hex(randomblob(16)));sqlite>insertintoopinions(x)values(hex(randomblob(16)));sqlite>select*fromopinions;x--------------------------------343D4BE24D07A96F8550B0942F664A6CD6289536E4A8057EB44754358EACD31AB4CA8E714CB57B11E7336263D214F30FA6491CA289ABF90EB2D76F5E1F919272sqlite>PRAGMAjournal_mode=wal;journal_mode------------walsqlite>PRAGMAintegrity_check;integrity_check---------------oksqlite>VACUUM;sqlite>^D
评论