SetAnonymousLabel sets the label for the current scope to a guaranteed unique value.
()
| 244 | |
| 245 | // SetAnonymousLabel sets the label for the current scope to a guaranteed unique value. |
| 246 | func (is *InterpreterStack) SetAnonymousLabel() { |
| 247 | // Postgres labels cannot have a tab character, so we can generate a label with one to guarantee it's unique |
| 248 | is.stack.Peek().label = fmt.Sprintf("\t%d", is.labelID) |
| 249 | is.labelID++ |
| 250 | } |
| 251 | |
| 252 | // BufferReturnQueryResults buffers |results| from a RETURN QUERY statement so that they can be returned when |
| 253 | // the function exits. If results from a previous RETURN QUERY call have already been buffered, |results| will |