parseIdentList converts a pgquery list of strings to []parser.Ident. pgquery doesn't preserve quoting information, so we assume unquoted (false).
(list *pgquery.List)
| 966 | // parseIdentList converts a pgquery list of strings to []parser.Ident. |
| 967 | // pgquery doesn't preserve quoting information, so we assume unquoted (false). |
| 968 | func (p PostgresParser) parseIdentList(list *pgquery.List) ([]parser.Ident, error) { |
| 969 | var idents []parser.Ident |
| 970 | for _, node := range list.Items { |
| 971 | switch n := node.Node.(type) { |
| 972 | case *pgquery.Node_String_: |
| 973 | // pgquery doesn't preserve quoting info, assume unquoted |
| 974 | idents = append(idents, parser.NewIdent(n.String_.Sval, false)) |
| 975 | } |
| 976 | } |
| 977 | return idents, nil |
| 978 | } |
| 979 | |
| 980 | func (p PostgresParser) parseTableName(relation *pgquery.RangeVar) (parser.TableName, error) { |
| 981 | if relation.Catalogname != "" { |
no test coverage detected