-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
otel version bump to v1.0.0-RC1 #1304
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
Conversation
Fixed incorrect type conversion
add timezone configuration for package gdb
add gutil.SliceToMapWithColumnAsKey
…ark funtcion Struct/Structs deprecated for gdb.Model
| DoDelete(ctx context.Context, link Link, table string, condition string, args ...interface{}) (result sql.Result, err error) // See Core.DoDelete. | ||
| DoQuery(ctx context.Context, link Link, sql string, args ...interface{}) (rows *sql.Rows, err error) // See Core.DoQuery. | ||
| DoExec(ctx context.Context, link Link, sql string, args ...interface{}) (result sql.Result, err error) // See Core.DoExec. | ||
| DoCommit(ctx context.Context, link Link, sql string, args []interface{}) (newSql string, newArgs []interface{}) // See Core.DoCommit. |
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.
interface method result newSql should be newSQL
| Model(tableNameOrStruct ...interface{}) *Model | ||
|
|
||
| // Raw creates and returns a model based on a raw sql not a table. | ||
| Raw(rawSql string, args ...interface{}) *Model |
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.
interface method parameter rawSql should be rawSQL
| } | ||
| // Handle the field names and place holders. | ||
| for k, _ := range listMap[0] { | ||
| for k, _ := range list[0] { |
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.
should omit 2nd value from range; this loop is equivalent to for k := range ...
| if composedSqlStr == "" { | ||
| composedSqlStr += fmt.Sprintf(`(%s)`, sqlWithHolder) | ||
| } else { | ||
| composedSqlStr += fmt.Sprintf(` %s (%s)`, unionTypeStr, sqlWithHolder) |
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.
var composedSqlStr should be composedSQLStr
| for _, v := range unions { | ||
| sqlWithHolder, holderArgs := v.getFormattedSqlAndArgs(queryTypeNormal, false) | ||
| if composedSqlStr == "" { | ||
| composedSqlStr += fmt.Sprintf(`(%s)`, sqlWithHolder) |
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.
var composedSqlStr should be composedSQLStr
| func (c *Core) doUnion(unionType int, unions ...*Model) *Model { | ||
| var ( | ||
| unionTypeStr string | ||
| composedSqlStr string |
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.
var composedSqlStr should be composedSQLStr
| listLength = len(list) | ||
| valueHolder = make([]string, 0) | ||
| ) | ||
| for k, _ := range list[0] { |
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.
should omit 2nd value from range; this loop is equivalent to for k := range ...
| } | ||
|
|
||
| func (d *DriverOracle) DoBatchInsert(ctx context.Context, link Link, table string, list interface{}, option int, batch ...int) (result sql.Result, err error) { | ||
| func (d *DriverOracle) DoInsert(ctx context.Context, link Link, table string, list List, option DoInsertOption) (result sql.Result, err error) { |
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.
exported method DriverOracle.DoInsert should have comment or be unexported
| // HandleSqlBeforeCommit deals with the sql string before commits it to underlying sql driver. | ||
| func (d *DriverOracle) HandleSqlBeforeCommit(ctx context.Context, link Link, sql string, args []interface{}) (newSql string, newArgs []interface{}) { | ||
| // DoCommit deals with the sql string before commits it to underlying sql driver. | ||
| func (d *DriverOracle) DoCommit(ctx context.Context, link Link, sql string, args []interface{}) (newSql string, newArgs []interface{}) { |
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.
method result newSql should be newSQL
| return model | ||
| } | ||
|
|
||
| func (tx *TX) Raw(rawSql string, args ...interface{}) *Model { |
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.
exported method TX.Raw should have comment or be unexported
method parameter rawSql should be rawSQL
| // Example: | ||
| // db.Raw("SELECT * FROM `user` WHERE `name` = ?", "john").Scan(&result) | ||
| // See Core.Raw. | ||
| func (m *Model) Raw(rawSql string, args ...interface{}) *Model { |
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.
method parameter rawSql should be rawSQL
| // Raw creates and returns a model based on a raw sql not a table. | ||
| // Example: | ||
| // db.Raw("SELECT * FROM `user` WHERE `name` = ?", "john").Scan(&result) | ||
| func (c *Core) Raw(rawSql string, args ...interface{}) *Model { |
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.
method parameter rawSql should be rawSQL
| type Model struct { | ||
| db DB // Underlying DB interface. | ||
| tx *TX // Underlying TX interface. | ||
| rawSql string // rawSql is the raw SQL string which marks a raw SQL based Model not a table based Model. |
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.
struct field rawSql should be rawSQL
| } | ||
| // Format DoInsertOption, especially for "ON DUPLICATE KEY UPDATE" statement. | ||
| columnNames := make([]string, 0, len(list[0])) | ||
| for k, _ := range list[0] { |
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.
should omit 2nd value from range; this loop is equivalent to for k := range ...
| } | ||
|
|
||
| func (m *Model) getFormattedSqlAndArgs(queryType string, limit1 bool) (sqlWithHolder string, holderArgs []interface{}) { | ||
| func (m *Model) getFormattedSqlAndArgs(queryType int, limit1 bool) (sqlWithHolder string, holderArgs []interface{}) { |
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.
method getFormattedSqlAndArgs should be getFormattedSQLAndArgs
| type User struct { | ||
| Id int `json:"id"` | ||
| Nickname string `gconv:"nickname"` | ||
| Id int |
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.
struct field Id should be ID
| defer dropTable(table) | ||
|
|
||
| type User struct { | ||
| Id int |
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.
struct field Id should be ID
| debugKey = "gf.debug" // Debug key for checking if in debug mode. | ||
| StackFilterKeyForGoFrame = "/github.com/gogf/gf/" // Stack filtering key for all GoFrame module paths. | ||
| debugKey = "gf.debug" // Debug key for checking if in debug mode. | ||
| StackFilterKeyForGoFrame = "github.com/gogf/gf@" // Stack filtering key for all GoFrame module paths. |
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.
exported const StackFilterKeyForGoFrame should have comment (or a comment on this block) or be unexported
| // 获取内容列表 | ||
| type ContentGetListReq struct { | ||
| ContentGetListInput | ||
| CategoryId uint `p:"cate"` |
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.
struct field CategoryId should be CategoryID
| Page int | ||
| Size int | ||
| Sort int | ||
| UserId uint |
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.
struct field UserId should be UserID
| // 获取内容列表 | ||
| type ContentGetListInput struct { | ||
| Type string | ||
| CategoryId uint `p:"cate"` |
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.
struct field CategoryId should be CategoryID
| // 获取内容列表 | ||
| type ContentGetListReq struct { | ||
| ContentGetListInput | ||
| CategoryId uint `p:"cate"` |
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.
struct field CategoryId should be CategoryID
| Page int | ||
| Size int | ||
| Sort int | ||
| UserId uint |
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.
struct field UserId should be UserID
| // 获取内容列表 | ||
| type ContentGetListInput struct { | ||
| Type string | ||
| CategoryId uint |
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.
struct field CategoryId should be CategoryID
| package gf | ||
|
|
||
| const VERSION = "v1.16.0" | ||
| const VERSION = "v1.16.4" |
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.
exported const VERSION should have comment or be unexported
|
@qinyuguang I created PR #1316 from your branch, so I close this one. |
No description provided.