Add NewEngineWithParams method can call SetParams for dialect. The dialect_… #798

Merged
m2nlight merged 5 commits from master into master 2018-03-08 01:30:39 +00:00
m2nlight commented 2017-12-08 03:42:31 +00:00 (Migrated from github.com)

ADD:

  • Add NewEngine2 method. It will call NewEngine and engine.dialect.SetArguments.
  • Add ROW_FORMAT support for CREATE TABLE in dialect_mysql.

EXAMPLE:

var args = map[string]string{"rowFormat": "DYNAMIC"}
engine, err := xorm.NewEngine2("mysql", connStr, args)

DETAILS:

ADD: - Add `NewEngine2` method. It will call `NewEngine` and `engine.dialect.SetArguments`. - Add `ROW_FORMAT` support for` CREATE TABLE` in `dialect_mysql`. EXAMPLE: ```golang var args = map[string]string{"rowFormat": "DYNAMIC"} engine, err := xorm.NewEngine2("mysql", connStr, args) ``` DETAILS: - ref: https://github.com/go-xorm/xorm/issues/793 - core: https://github.com/go-xorm/core/pull/36
codecov-io commented 2018-03-07 09:52:35 +00:00 (Migrated from github.com)

Codecov Report

Merging #798 into master will decrease coverage by 0.01%.
The diff coverage is 55.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #798      +/-   ##
==========================================
- Coverage   53.28%   53.27%   -0.02%     
==========================================
  Files          39       39              
  Lines        7394     7448      +54     
==========================================
+ Hits         3940     3968      +28     
- Misses       2951     2977      +26     
  Partials      503      503
Impacted Files Coverage Δ
xorm.go 65.62% <0%> (-1.05%) ⬇️
dialect_mysql.go 59.39% <60%> (-1.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b462ede...52fd00b. Read the comment docs.

# [Codecov](https://codecov.io/gh/go-xorm/xorm/pull/798?src=pr&el=h1) Report > Merging [#798](https://codecov.io/gh/go-xorm/xorm/pull/798?src=pr&el=desc) into [master](https://codecov.io/gh/go-xorm/xorm/commit/b462eded54db6c83c35e0d950391a9d2b7ea55f6?src=pr&el=desc) will **decrease** coverage by `0.01%`. > The diff coverage is `55.55%`. [![Impacted file tree graph](https://codecov.io/gh/go-xorm/xorm/pull/798/graphs/tree.svg?token=yB5nO1krEe&width=650&height=150&src=pr)](https://codecov.io/gh/go-xorm/xorm/pull/798?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #798 +/- ## ========================================== - Coverage 53.28% 53.27% -0.02% ========================================== Files 39 39 Lines 7394 7448 +54 ========================================== + Hits 3940 3968 +28 - Misses 2951 2977 +26 Partials 503 503 ``` | [Impacted Files](https://codecov.io/gh/go-xorm/xorm/pull/798?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [xorm.go](https://codecov.io/gh/go-xorm/xorm/pull/798/diff?src=pr&el=tree#diff-eG9ybS5nbw==) | `65.62% <0%> (-1.05%)` | :arrow_down: | | [dialect\_mysql.go](https://codecov.io/gh/go-xorm/xorm/pull/798/diff?src=pr&el=tree#diff-ZGlhbGVjdF9teXNxbC5nbw==) | `59.39% <60%> (-1.33%)` | :arrow_down: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/go-xorm/xorm/pull/798?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/go-xorm/xorm/pull/798?src=pr&el=footer). Last update [b462ede...52fd00b](https://codecov.io/gh/go-xorm/xorm/pull/798?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@m2nlight sorry, I think we have to use the same name between core and xorm. So that I create a new pull request https://github.com/go-xorm/core/pull/40. Could you change this PR to rename all argument as param.

@m2nlight sorry, I think we have to use the same name between `core` and `xorm`. So that I create a new pull request `https://github.com/go-xorm/core/pull/40`. Could you change this PR to rename all `argument` as `param`.
m2nlight commented 2018-03-07 20:09:47 +00:00 (Migrated from github.com)

@lunny You're right, It's OK! ^___^

@lunny You're right, It's OK! ^___^

Thanks!

Thanks!
Sign in to join this conversation.
No description provided.