Git Product home page Git Product logo

minisql's Introduction

项目成员

tim.ng, zhe.hu, yun.bai

需求产生原因

在某个游戏开发过程中,客户端的模板数据是使用sqlite做数据库,业务中使用sql语句查询模板数据,随着策划的人越来越多,数据库大小到了10+M,zip之后也有2.9M。游戏上线后策划修改任何一行数据,玩家都需要更新这个2.9M的DB文件让人十分痛心。 所以决定把模板数据化整为零,思路有三条:

  • 1.每张表一个DB
  • 2.更换数据存储格式,用lua,json,xml之类的,自己做查询
  • 3.用sql语句做同步

第一种不知道为什么,总觉得有点蠢不严谨,但是好在改动代码最少,风险最小。第二种科学无污染,但是工作量大。第三种维护成本高,玩家的更新不好做。 根据怎么屌怎么来的原则最终选择了第二种,最开始尝试使用lua作为文件格式,经测试发现lua在手机上性能令人发指,基本不可用,让人寒心。由此催生了本项目的需求。

需求

以某种格式化文本为文件存储格式,提供简单的查询api提供给其他的语言调用,与业务无关联。

  • 支持数值类型的>, <, =, <=, >=, !=的条件检测(对应sql .... where xxx > 100)
  • 支持字符类型的=, !=, in(包含), out(不包含)的条件检测(对应sql .... where xxx = 'hello world')
  • 支持列表类型的in(包含), out(不包含)的条件检测(对应sql .... where xxx in {1, 2, 3, 4})
  • 以上条件可以组合
  • 支持分组,排序(对应sql order by, group by)

就酱

minisql's People

Contributors

timngchina avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

skyformat99

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.