Remove unused stored procedure function
This commit is contained in:
parent
e2bd38d665
commit
14e95a2fe0
1 changed files with 0 additions and 15 deletions
|
|
@ -347,18 +347,3 @@ func (p TimestamptzParam) ToSql() string {
|
||||||
t := time.Time(p)
|
t := time.Time(p)
|
||||||
return fmt.Sprintf("'%s'::timestamptz", t.Format("2006-01-02 15:04:05.999999-07:00"))
|
return fmt.Sprintf("'%s'::timestamptz", t.Format("2006-01-02 15:04:05.999999-07:00"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryStoredProcedure(procedure string, params ...SqlParam) string {
|
|
||||||
if len(params) == 0 {
|
|
||||||
return fmt.Sprintf("SELECT * FROM %s()", procedure)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert each parameter to its SQL representation
|
|
||||||
paramStrings := make([]string, len(params))
|
|
||||||
for i, param := range params {
|
|
||||||
paramStrings[i] = param.ToSql()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Join parameters and return the execute statement
|
|
||||||
return fmt.Sprintf("SELECT * FROM %s(%s)", procedure, strings.Join(paramStrings, ", "))
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue