Showing 8 of 8 total issues
Class Compiler
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class Compiler < Alf::Compiler
def join(plan)
Builder.new
end
Class Builder
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class Builder
DISTINCT = Grammar.sexpr([:set_quantifier, "distinct"])
ALL = Grammar.sexpr([:set_quantifier, "all"])
IS_TABLE_DEE = Grammar.sexpr([:select_list,
Method rewrite
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rewrite(plan, expr, compiled, processor, args = [])
Method to_sql
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_sql(buffer = "")
each_with_index do |child, index|
next if index == 0
unless index == 1
buffer << Sql::Expr::SPACE << to_sql_operator << Sql::Expr::SPACE
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method build_semijoin_predicate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def build_semijoin_predicate(left, right)
if right.is_table_dee?
right.where_clause.predicate
else
commons = left.to_attr_list & right.to_attr_list
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method to_sql
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_sql(buffer = "", parenthesize = !buffer.empty?)
if parenthesize
sql_parenthesized(buffer){|b| to_sql(b, false) }
else
left.to_sql(buffer, true)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method to_sql
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_sql(buffer = "", parenthesize = !buffer.empty?)
if parenthesize
sql_parenthesized(buffer){|b| to_sql(b, false) }
else
buffer << (distinct? ? SELECT_DISTINCT : SELECT)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method to_sql
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_sql(buffer = "")
identifier.to_sql(buffer)
buffer << Sql::Expr::SPACE << Sql::Expr::IN << Sql::Expr::SPACE
if subquery?
values.to_sql(buffer)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"