(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestPostgresDialect(t *testing.T) { |
| 66 | d := &postgresDialect{} |
| 67 | |
| 68 | if d.Driver() != DriverPostgres { |
| 69 | t.Errorf("expected DriverPostgres, got %v", d.Driver()) |
| 70 | } |
| 71 | if got := d.Placeholder(3); got != "$3" { |
| 72 | t.Errorf("Placeholder(3) = %q", got) |
| 73 | } |
| 74 | if got := d.JSONExtractText("i.fields", "status"); got != "i.fields->>'status'" { |
| 75 | t.Errorf("JSONExtractText = %q", got) |
| 76 | } |
| 77 | if got := d.JSONRemove("fields", "phase"); got != "(fields::jsonb - 'phase')" { |
| 78 | t.Errorf("JSONRemove = %q", got) |
| 79 | } |
| 80 | if got := d.GroupConcat("u.name", true); got != "STRING_AGG(DISTINCT u.name, ',')" { |
| 81 | t.Errorf("GroupConcat = %q", got) |
| 82 | } |
| 83 | if got := d.ILike(); got != "ILIKE" { |
| 84 | t.Errorf("ILike = %q", got) |
| 85 | } |
| 86 | } |
nothing calls this directly
no test coverage detected