Skip to content
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

Perf/cha 11 perf memory #1006

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion query_column_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (q *AddColumnQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []byte
//------------------------------------------------------------------------------

func (q *AddColumnQuery) Exec(ctx context.Context, dest ...interface{}) (sql.Result, error) {
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_column_drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (q *DropColumnQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []byt
//------------------------------------------------------------------------------

func (q *DropColumnQuery) Exec(ctx context.Context, dest ...interface{}) (sql.Result, error) {
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (q *DeleteQuery) scanOrExec(
}

// Generate the query before checking hasReturning.
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_index_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (q *CreateIndexQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []by
//------------------------------------------------------------------------------

func (q *CreateIndexQuery) Exec(ctx context.Context, dest ...interface{}) (sql.Result, error) {
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_index_drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (q *DropIndexQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []byte
//------------------------------------------------------------------------------

func (q *DropIndexQuery) Exec(ctx context.Context, dest ...interface{}) (sql.Result, error) {
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ func (q *InsertQuery) scanOrExec(
}

// Generate the query before checking hasReturning.
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (q *MergeQuery) scanOrExec(
}

// Generate the query before checking hasReturning.
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions query_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ func (q *SelectQuery) Rows(ctx context.Context) (*sql.Rows, error) {
return nil, err
}

queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand All @@ -828,7 +828,7 @@ func (q *SelectQuery) Exec(ctx context.Context, dest ...interface{}) (res sql.Re
return nil, err
}

queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -875,7 +875,7 @@ func (q *SelectQuery) Scan(ctx context.Context, dest ...interface{}) error {
return err
}

queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion query_table_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func (q *CreateTableQuery) Exec(ctx context.Context, dest ...interface{}) (sql.R
return nil, err
}

queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_table_drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (q *DropTableQuery) Exec(ctx context.Context, dest ...interface{}) (sql.Res
}
}

queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_table_truncate.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (q *TruncateTableQuery) AppendQuery(
//------------------------------------------------------------------------------

func (q *TruncateTableQuery) Exec(ctx context.Context, dest ...interface{}) (sql.Result, error) {
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion query_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ func (q *UpdateQuery) scanOrExec(
}

// Generate the query before checking hasReturning.
queryBytes, err := q.AppendQuery(q.db.fmter, q.db.makeQueryBytes())
queryBytes, err := q.AppendQuery(q.db.fmter, make([]byte, 0))
if err != nil {
return nil, err
}
Expand Down
Loading