Coder Social home page Coder Social logo

rider's Introduction

Rider 文件数据库

用SQL解析文件

(1)完全支持MySql协议
(2)完全支持Mybatis-Generator
(3)完全支持Mybatis (4)支持Schema和Table
(5)支持客户端创建Schema和Table
(6)支持常用select语句where,condition,行运算等
(7)支持视图功能,即用旧表的SQL定义新表
(8)支持各种文件格式(各种分隔符分割,Xlsx)
(9)支持按时间动态切换表

QQ群

608733920

##启动

git clone https://github.com/alchemystar/Rider.git
mvn clean package
cd target && tar zxvf rider.tar.gz
cd ./bin
sh start.sh

配置文件,在./conf中

<database>
    <port>8090</port> <!--server 端口号-->
    <user>user</user> <!--server 用户名-->
    <pass>123123123</pass> <!--server 密码-->
    <schema>  <!--schema定义-->
        <name>test</name> <!--schema名称-->
         <table>
            <sql> create table if not exists t_view (id BIGINT comment 'id view',nameExtension VARCHAR comment 'name extension')Engine='archer',Charset='gbk'
            </sql>
            <!--这是一个视图表,其表内容为下面的viewSql的执行结果-->
            <viewSql> select a.id*1000,a.name||b.extension,a.id from t_archer as a join t_archer as b where a.id=b.id </viewSql>
        </table>
        <table> <!--表定义-->
            <sql> <!--表定义sql-->
                create table if not exists t_archer( id BIGINT comment 'id test ', name VARCHAR comment 'name
                test',
                extension VARCHAR comment 'extension' )Engine='archer' SEP=',' SKIPWRONG='false' comment='just for test'
            </sql>
            <skipRows>3</skipRows> <!--忽略掉前skipRows行-->
            <pathPattern>/Users/alchemystar/tmp/rider/rider_%d{yyyy-MM-dd}.txt</pathPattern> <!--当前表对应的文件地址,可用时间格式渲染-->
        </table>
    </schema>
</database>

使用

直接连接 mysql -uuser -p123123123 -P8090 -h127.0.0.1
jdbc连接 jdbc:mysql://127.0.0.1/test?user=user&password=123123123

创建表

create table if not exists t_archer( 
 id BIGINT comment 'id test ', 
 name VARCHAR comment 'name test',
extension VARCHAR comment 'extension' )
Engine='archer' SEP=',' Charset='gbk' SkipWrong='false'  comment='just for test'

Engine=archer 默认引擎,即默认以换行符和分隔符来组织文件的结构
SEP=',',可以指定当前文件用哪种分隔符来分隔
Charset='gbk',指定当前文件的编码格式
SkipWrong='false' false:文件某一行列数和定义列数不匹配,则报error|true,忽略当前行

配置表对应的文件路径

session内配置:

set table_path="t_archer:/home/work/archer.txt" 

配置文件内配置:

<pathPattern>/Users/alchemystar/tmp/rider/rider_%d{yyyy-MM-dd}.txt</pathPattern> <!--当前表对应的文件地址,可用时间格式渲染-->

视图配置,viewSql可以是任意sql(可以用视图再次创建视图):

 <viewSql> select a.id*1000,a.name||b.extension,a.id from t_archer as a join t_archer as b where a.id=b.id </viewSql>

查询表

(1)支持*符

select * from t_archer; 

(2)支持行运算

select (id+1)*6,name||extesion,extension from t_archer;

(3)支持where condition

select * from t_archer where (id >1 and extension='rider') or (extension='archer')

(4)支持设置字符集

set names gbk;

(5)支持两表join

select a.id,b.id from t_rider as a join t_archer as b on a.id=b.id where id>1;

rider's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rider's Issues

hello ,why ? donot start up?

D:\MyNosql\Rider\target\rider\conf
19:14:03.575 [Thread-0] INFO a.engine.server.RiderServer - Start The Rider
19:14:03.582 [Thread-0] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
19:14:03.583 [Thread-0] DEBUG i.n.c.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 16
19:14:03.600 [Thread-0] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
19:14:03.600 [Thread-0] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
Load config errororg.dom4j.DocumentException: null Nested exception: null
请按任意键继续. . .

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.