@@ -10,7 +10,7 @@
Loading
10 10
    SQLExpression(:AS, SQLExpression(:FROM, sql_expression), :__TABLE__)
11 11
end
12 12
13 -
function translate(something::Union{Char, AbstractString}; _primary = true)
13 +
function translate(something::Union{Char,AbstractString}; _primary = true)
14 14
    repr(something)
15 15
end
16 16
@@ -29,11 +29,11 @@
Loading
29 29
function translate_default(location, function_type, SQL_call)
30 30
    result = :(
31 31
        function translate_call($function_type, arguments...; _primary = true)
32 -
            $SQLExpression($SQL_call, $map(
33 -
                argument -> $translate(argument; _primary = _primary),
32 +
        $SQLExpression($SQL_call, $map(
33 +
                argument->$translate(argument; _primary = _primary),
34 34
                arguments
35 35
            )...)
36 -
        end
36 +
    end
37 37
    )
38 38
    result.args[2].args[1] = location
39 39
    result
@@ -161,7 +161,7 @@
Loading
161 161
        ),
162 162
        # mark both as not _primary to always be explicit about table
163 163
        Generator(
164 -
            pair -> as(pair; _primary = false),
164 +
            pair->as(pair; _primary = false),
165 165
            pairs(combine(model_row_1, model_row_2))
166 166
        )...
167 167
    )
@@ -179,7 +179,7 @@
Loading
179 179
    SQLExpression(
180 180
        :SELECT, inner,
181 181
        Generator(
182 -
            pair -> as(pair; _primary = _primary),
182 +
            pair->as(pair; _primary = _primary),
183 183
            pairs(call(model_row(select_table)))
184 184
        )...
185 185
    )

@@ -4,10 +4,10 @@
Loading
4 4
5 5
split_keyword(keyword::Expr) =
6 6
    if keyword.head === :kw
7 -
        Pair(keyword.args[1], keyword.args[2])
8 -
    else
9 -
        error("Cannot split keyword $keyword")
10 -
    end
7 +
    Pair(keyword.args[1], keyword.args[2])
8 +
else
9 +
    error("Cannot split keyword $keyword")
10 +
end
11 11
12 12
# Split a function call into its pieces
13 13
# Normalize non-function-like patterns into function calls

@@ -28,8 +28,8 @@
Loading
28 28
    source_row = SourceRow(source, table_name)
29 29
    NamedTuple{column_names}(
30 30
        map(column_names) do column_name
31 -
            get_column(source_row, column_name)
32 -
        end
31 +
        get_column(source_row, column_name)
32 +
    end
33 33
    )
34 34
end
35 35
@@ -39,7 +39,7 @@
Loading
39 39
end
40 40
41 41
# Grouped rows have their own dedicated model type
42 -
struct GroupRow{Group, Row}
42 +
struct GroupRow{Group,Row}
43 43
    group::Group
44 44
    row::Row
45 45
end

@@ -1,9 +1,9 @@
Loading
1 -
function generate_namedtuple(::Type{NamedTuple{names, types}}, q) where {names, types}
1 +
function generate_namedtuple(::Type{NamedTuple{names,types}}, q) where {names,types}
2 2
    if @generated
3 3
        vals = Tuple(:(getvalue(q, $i, $(fieldtype(types, i)))) for i = 1:fieldcount(types))
4 -
        return :(NamedTuple{names, types}(($(vals...),)))
4 +
        return :(NamedTuple{names,types}(($(vals...),)))
5 5
    else
6 -
        return NamedTuple{names, types}(Tuple(getvalue(q, i, fieldtype(types, i)) for i = 1:fieldcount(types)))
6 +
        return NamedTuple{names,types}(Tuple(getvalue(q, i, fieldtype(types, i)) for i = 1:fieldcount(types)))
7 7
    end
8 8
end
9 9
@@ -44,14 +44,14 @@
Loading
44 44
        julia_type = juliatype(column_type) # native SQLite Int, Float, and Text types
45 45
        sqlitevalue(
46 46
            if julia_type === Any
47 -
                if !isbitstype(Value)
48 -
                    Value
49 -
                else
50 -
                    julia_type
51 -
                end
47 +
            if !isbitstype(Value)
48 +
                Value
52 49
            else
53 50
                julia_type
54 -
            end, handle, column_number)
51 +
            end
52 +
        else
53 +
            julia_type
54 +
        end, handle, column_number)
55 55
    end
56 56
end
57 57
@@ -118,14 +118,11 @@
Loading
118 118
    handle = statement.handle
119 119
    schema = ntuple(
120 120
        let handle = handle
121 -
            column_number -> name_and_type(handle, column_number)
122 -
        end,
121 +
        column_number->name_and_type(handle, column_number)
122 +
    end,
123 123
        sqlite3_column_count(handle)
124 124
    )
125 -
    SQLiteCursor{NamedTuple{
126 -
        Tuple(map(first, schema)),
127 -
        Tuple{map(second, schema)...}
128 -
    }}(statement, Ref(status), Ref(0))
125 +
    SQLiteCursor{NamedTuple{Tuple(map(first, schema)),Tuple{map(second, schema)...}}}(statement, Ref(status), Ref(0))
129 126
end
130 127
131 128
# Use default show methods from the queryverse
Files Coverage
src 89.12%
Project Totals (9 files) 89.12%
codecov-umbrella
Build #251965844 -
unittests

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading