-
Notifications
You must be signed in to change notification settings - Fork 47
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
Dev 1002 增加 leveldb key-value db, 供librime-lua 調用 大資料 ,可 減少載入時間及內存 #177
Conversation
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
* add EngineReg select_schema() env.engine:select( string schema_id ) .next Signed-off-by: shewer <[email protected]> * add engine:apply_schema( Schema &) Schema( const string &) Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: shewer <[email protected]>
Signed-off-by: Shewer Lu <[email protected]>
Signed-off-by: Shewer Lu <[email protected]>
Signed-off-by: Shewer Lu <[email protected]>
Signed-off-by: Shewer Lu <[email protected]>
src/types_ext.inc
Outdated
} | ||
string fetch(an<T> t, const string& key){ | ||
string res; | ||
return ( t->Fetch(key,&res) )? res : nullptr ; |
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.
这里试过吗?nullptr
应该会崩掉
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.
optional<string>
看起来合理一些,参考 ConfigValueReg::get_bool()
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.
嗯 這是個問題,本想 查詢不到 return nil
key 查不到 nell or 空字串
nil 就要用 raw_fetch return nil
建議用 nli ro "" ??
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.
optional<string>
return {}
就是会翻译成 lua 的 nil
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.
ok 改好了
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.
終於可以用 leveldb 調用 ecdict 英打+美漢字典
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.
ReverseDictionaryReg
和 ProjectionReg
有几个类似的地方可以也统一改一下
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.
ProjectionReg 建議和 librime 相同機制
pattern 異常 return 原碼
ReverseDB 反查不到 return ""
Signed-off-by: Shewer Lu <[email protected]>
增加 leveldb key-value db
供librime-lua 調用 大資料 ,可 減少載入時間及內存