SQLStringFullyQualified is a wrapper for SQLString() for when we need the type name to be a fully-qualified 3-part name.
()
| 2123 | // SQLStringFullyQualified is a wrapper for SQLString() for when we need the |
| 2124 | // type name to be a fully-qualified 3-part name. |
| 2125 | func (t *T) SQLStringFullyQualified() string { |
| 2126 | if t.UserDefined() { |
| 2127 | switch t.Family() { |
| 2128 | case ArrayFamily: |
| 2129 | return t.ArrayContents().SQLStringFullyQualified() + "[]" |
| 2130 | default: |
| 2131 | if t.TypeMeta.Name != nil { |
| 2132 | // Include the catalog in the type name. This is necessary to properly |
| 2133 | // resolve the type, as some code paths require the database name to |
| 2134 | // correctly distinguish cross-database references. |
| 2135 | return t.TypeMeta.Name.FQName(true /* explicitCatalog */) |
| 2136 | } |
| 2137 | } |
| 2138 | } |
| 2139 | return t.SQLString() |
| 2140 | } |
| 2141 | |
| 2142 | // SQLStringForError returns a version of SQLString that will preserve safe |
| 2143 | // information during redaction. It is suitable for usage in error messages. |
no test coverage detected