(&self, context: &mut Context, out: &mut DynQuery, value: &ColumnRef)
| 34 | if context.qualify_columns { |
| 35 | let table_ref = mem::take(&mut context.table_ref); |
| 36 | let mut schema = &table_ref.schema; |
| 37 | if schema.is_empty() { |
| 38 | schema = &value.schema; |
| 39 | } |
| 40 | let mut table = &table_ref.alias; |
| 41 | if table.is_empty() { |
| 42 | table = &table_ref.name; |
| 43 | } |
| 44 | if table.is_empty() { |
| 45 | table = &value.table; |
| 46 | } |
| 47 | if !table.is_empty() { |
| 48 | out.push('"'); |
| 49 | if !schema.is_empty() { |
| 50 | write_escaped(out, schema, '"', "\"\""); |
| 51 | out.push_str(self.separator()); |
| 52 | } |
| 53 | write_escaped(out, table, '"', "\"\""); |
| 54 | out.push('"'); |
| 55 | out.push_str(self.separator()); |
| 56 | } |
| 57 | context.table_ref = table_ref; |
| 58 | } |
| 59 | self.write_identifier(context, out, &value.name, true); |
| 60 | } |
| 61 | |
| 62 | fn write_table_ref(&self, context: &mut Context, out: &mut AnyQuery, value: &TableRef) { |
| 63 | let alias_declaration = self.is_alias_declaration(context); |
| 64 | if alias_declaration || value.alias.is_empty() { |
| 65 | out.push('"'); |
| 66 | if !value.schema.is_empty() { |
nothing calls this directly
no test coverage detected