rider连接mysql数据库_GitHub - alchemystar/Rider: 文件数据库
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中
8090
user
123123123
test
create table if not exists t_view (id BIGINT comment 'id view',nameExtension VARCHAR comment 'name extension')Engine='archer',Charset='gbk'
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
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'
3
/Users/alchemystar/tmp/rider/rider_%d{yyyy-MM-dd}.txt
使用
直接連接 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"
配置文件內配置:
/Users/alchemystar/tmp/rider/rider_%d{yyyy-MM-dd}.txt
視圖配置,viewSql可以是任意sql(可以用視圖再次創建視圖):
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
查詢表
(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连接mysql数据库_GitHub - alchemystar/Rider: 文件数据库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 英国用欧元吗,不用
- 下一篇: python 创建子类_python创建