-
Notifications
You must be signed in to change notification settings - Fork 45
sqlite #619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlite #619
Conversation
|
Thanks for your contribution! |
sqlite/graphnet.sql
Outdated
| @@ -0,0 +1,81 @@ | |||
| -- SQLite | |||
| -- create Repo table | |||
| DROP TABLE IF EXISTS Repo; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个很危险啊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个脚本一旦重复执行,数据就会立刻丢掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
sqlite/graphnet.sql
Outdated
| repo_uid VARCHAR(255) NOT NULL, | ||
| relative_model_path TEXT NOT NULL UNIQUE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative_model_path单独应该不是unique的。(relative_model_path, repo_uid)合起来才是。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
每个表的联合索引都需要小心处理,区分度大的放前面
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,现在在写ORM
sqlite/graphnet.sql
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
重命名成create_main_tables_$(date +"%Y-%m-%d-%H%M%S").sql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
|
BackwardGraphSource 后续再改进,而且这个要确定最后的结果是对子图进行的backward存储还是整图的backward也要存储 |
可以 |
sqlite/graphsample_insert.py
Outdated
|
|
||
|
|
||
| # DimensionGeneralizationSource insert func | ||
| def insert_DimensionGeneralizationSource( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些函数名字太诡异了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
insert_dimension_info ?
insert_datatype_info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
insert_dimension_generalization_source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done,目前完成数据库的init和insert功能,下周继续完成数据库的delete功能,updata功能待定,同时添加“运行insert的sh功能”时产生时间戳log,表示在哪时候插入,init产生时间戳log,都加一个时间戳log,后续可以分析时间戳log来获得某些额外信息
这样可以替代create_main_tables_$(date +"%Y-%m-%d-%H%M%S").sql功能
示例:python ./sqlite/orm_models.py init | tee "sqlite/logs/init_$(date +'%Y-%m-%d-%H%M%S').log"
PR Category
Feature Enhancement
Description
完成Repo GraphSample SubgraphSource DimensionGeneralizationSource表的插入,DataTypeGeneralizationSource暂时未操作,不知道具体格式