简体   繁体   中英

Online database in Lua/ComputerCraft

I want an online storage that can connect with ComputerCraft in Minecraft. ComputerCraft is Lua-based. I have heard that you can not use MySQL in Lua.

Is there some sort of online database like MySQL that I can use in Lua without installing external programs? Because I only have access to Lua computers in-game, I cannot install an external program such as LuaSQL. Is there any other way?

不,没有第三方扩展,您无法在Lua(甚至是ComputerCraft Lua)中访问MySQL数据库。

您可以构建文件读/写脚本并为您的表序列化数据存储...这不是最好的方法,但这是一种可行的方法

Since I am not that into web based database communication, i would guess you need an API which delivers chunks of information asked by HTTP/HTTPS Requests. And a webserver of course.

I played a bit with CouchDB in combination with a nodejs webserver to create a very lean API with database support. So this might make the cut. http://simonholywell.com/post/2011/10/getting-started-node-js-couch-db.html Speeking in terms of webserver, there are several webservices like heroku that give free servers for testing etc.

Also would be very though. In combination with Applied Energistics you could monitor storage or crafting times etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM