pkg/instancestore/instancestoresql/instance_data_query.go
Method instanceDataQuery.UpdateInstanceData
has 74 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (q *instanceDataQuery) UpdateInstanceData(ctx context.Context, args *instancestore.UpdateInstanceDataArgs) error {
var vals []interface{}
var clauses []string
query := fmt.Sprintf("UPDATE %s", table)
Method instanceDataQuery.PopMessage
has 6 return statements (exceeds 4 allowed). Open
Open
func (q *instanceDataQuery) PopMessage(ctx context.Context) (*instancestore.InstanceMessageData, error) {
columns := []string{fieldInstanceMessageID, fieldInstanceMessageInstanceID, fieldInstanceMessageCreatedAt, fieldInstanceMessagePayload}
query := fmt.Sprintf(`SELECT %s FROM %s WHERE %s = ? ORDER BY %s ASC LIMIT 1`, strings.Join(columns, ", "), messagesTable, fieldInstanceMessageInstanceID, fieldInstanceMessageCreatedAt)
msg := &instancestore.InstanceMessageData{}