-
Notifications
You must be signed in to change notification settings - Fork 255
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
增加Mssql和Postgres schema选项 #713
Conversation
reader/sql/sql.go
Outdated
schemas: schemas, | ||
encoder: encoder, | ||
postgresSchema: pgSchema, | ||
mssqlSchema: mssqlSchema, |
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.
这里可以就叫dbSchema,不用写三个
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.
麻烦对代码进行下 go fmt
reader/sql/sql.go
Outdated
@@ -166,6 +166,7 @@ func NewReader(meta *reader.Meta, conf conf.MapConf) (reader.Reader, error) { | |||
readBatch, _ = conf.GetIntOr(reader.KeyMssqlReadBatch, 100) | |||
offsetKey, _ = conf.GetStringOr(reader.KeyMssqlOffsetKey, "") | |||
dataSource, err = conf.GetString(reader.KeyMssqlDataSource) | |||
dbSchema, _ = conf.GetStringOr(reader.KeyMssqlSchema, "dbo") | |||
if err != 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.
这行 if err!=nil是紧跟着 dataSource的,你插入的这一行要么放在dataSource上面,要么放在error判断下面,不要放在中间
reader/sql/sql.go
Outdated
@@ -184,6 +185,7 @@ func NewReader(meta *reader.Meta, conf conf.MapConf) (reader.Reader, error) { | |||
readBatch, _ = conf.GetIntOr(reader.KeyPGsqlReadBatch, 100) | |||
offsetKey, _ = conf.GetStringOr(reader.KeyPGsqlOffsetKey, "") | |||
dataSource, err = conf.GetString(reader.KeyPGsqlDataSource) | |||
dbSchema, _ = conf.GetStringOr(reader.KeyPGsqlSchema, "public") |
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.
同上
lgtm |
ping @redHJ |
reader/rest_reader_models.go
Outdated
ChooseOnly: false, | ||
Placeholder: "<schema>", | ||
DefaultNoUse: true, | ||
Description: "数据库架构名称(mssql_schema)", |
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.
数据库 schema ?(我找了一下中文,基本都是叫架构或者模式,也不知道哪个好)
reader/rest_reader_models.go
Outdated
Placeholder: "<schema>", | ||
DefaultNoUse: true, | ||
Description: "数据库架构名称(mssql_schema)", | ||
ToolTip: "数据库架构名称", |
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.
开始想用模式,看到sqlserver 也有有用架构一词的,模式应该更通俗点
reader/rest_reader_models.go
Outdated
Placeholder: "<schema>", | ||
DefaultNoUse: true, | ||
Description: "数据库架构名称(postgres_schema)", | ||
ToolTip: "数据库架构名称", |
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.
同上
lgtm |
logkit s3 和 cloudtrail 元数据目录生成逻辑不依赖ak/sk #713
Fixes [issue number]
Changes