(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func TestSQLiteDialect(t *testing.T) { |
| 69 | t.Parallel() |
| 70 | d := &sqliteDialect{} |
| 71 | |
| 72 | if d.Driver() != DriverSQLite { |
| 73 | t.Errorf("expected DriverSQLite, got %v", d.Driver()) |
| 74 | } |
| 75 | if got := d.JSONExtractText("i.fields", "status"); got != "json_extract(i.fields, '$.status')" { |
| 76 | t.Errorf("JSONExtractText = %q", got) |
| 77 | } |
| 78 | if got := d.Now(); got != "datetime('now')" { |
| 79 | t.Errorf("Now = %q", got) |
| 80 | } |
| 81 | if got, _ := d.FTSMatch("items_fts", "search_vector", "hello"); got != "items_fts MATCH ?" { |
| 82 | t.Errorf("FTSMatch = %q", got) |
| 83 | } |
| 84 | if got := d.GroupConcat("u.name", true); got != "GROUP_CONCAT(DISTINCT u.name)" { |
| 85 | t.Errorf("GroupConcat = %q", got) |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | func TestPostgresDialect(t *testing.T) { |
| 90 | t.Parallel() |
nothing calls this directly
no test coverage detected