• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stephenafamo / bob / 14939098091

09 May 2025 10:59PM UTC coverage: 36.868% (-4.6%) from 41.506%
14939098091

push

github

stephenafamo
Move reusable sqlite parser components to antlrhelpers package

0 of 758 new or added lines in 12 files covered. (0.0%)

547 existing lines in 8 files now uncovered.

6533 of 17720 relevant lines covered (36.87%)

212.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/gen/bobgen-helpers/parser/antlrhelpers/stmt.go
1
package antlrhelpers
2

3
import (
4
        "fmt"
5
        "strings"
6

7
        "github.com/stephenafamo/bob"
8
        "github.com/stephenafamo/bob/gen/drivers"
9
        "github.com/stephenafamo/bob/internal"
10
)
11

12
type StmtInfo struct {
13
        Node      Node
14
        QueryType bob.QueryType
15
        Comment   string
16
        Columns   []ReturnColumn
17
        EditRules []internal.EditRule
18
        Mods      *strings.Builder
19
        Imports   [][]string
20
}
21

22
type ReturnColumn struct {
23
        Name   string
24
        Type   NodeTypes
25
        Config drivers.QueryCol
26
}
27

28
type QuerySources = []QuerySource
29

30
type QuerySource struct {
31
        Schema  string
32
        Name    string
33
        Columns []ReturnColumn
34
        CTE     bool
35
}
36

NEW
37
func ExpandQuotedSource(buf *strings.Builder, source QuerySource) {
×
NEW
38
        for i, col := range source.Columns {
×
NEW
39
                if i > 0 {
×
NEW
40
                        buf.WriteString(", ")
×
NEW
41
                }
×
NEW
42
                if source.Schema != "" {
×
NEW
43
                        fmt.Fprintf(buf, "%q.%q.%q", source.Schema, source.Name, col.Name)
×
NEW
44
                } else {
×
NEW
45
                        fmt.Fprintf(buf, "%q.%q", source.Name, col.Name)
×
NEW
46
                }
×
47
        }
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc