MCPcopy Index your code
hub / github.com/bytebase/bytebase / Join

Method Join

backend/common/qb/qb.go:31–41  ·  view source on GitHub ↗

Join adds a query part with a custom separator. The separator is prepended to the text (except for the first part).

(separator, text string, params ...any)

Source from the content-addressed store, hash-verified

29// Join adds a query part with a custom separator.
30// The separator is prepended to the text (except for the first part).
31func (q *Query) Join(separator, text string, params ...any) *Query {
32 if q == nil {
33 q = Q()
34 }
35 // Prepend separator if not the first part
36 if len(q.parts) > 0 {
37 text = separator + text
38 }
39 q.parts = append(q.parts, makePart(text, params...))
40 return q
41}
42
43// makePart creates a QueryPart, expanding any *Query parameters inline.
44func makePart(text string, params ...any) QueryPart {

Callers 15

SpaceMethod · 0.95
AndMethod · 0.95
OrMethod · 0.95
CommaMethod · 0.95
WhereMethod · 0.95
buildMessageMethod · 0.80
GetValueWithKeyFunction · 0.80
getCaretPositionFunction · 0.80
createViewDDLFunction · 0.80
columnListDDLFunction · 0.80
omniExprNameMethod · 0.80
quoteMySQLColumnsFunction · 0.80

Calls 2

QFunction · 0.85
makePartFunction · 0.85

Tested by 15

getCaretPositionFunction · 0.64
TestGetStatementRangeFunction · 0.64
getCaretPositionFunction · 0.64
TestGetStatementRangeFunction · 0.64
TestGetStatementRangesFunction · 0.64
TestGetStatementRangeFunction · 0.64
getCaretPositionFunction · 0.64
getColumnExtraInfoFunction · 0.64
splitByGOFunction · 0.64