(gj *core.GraphJin, gql string, vars json.RawMessage, err error)
| 15 | } |
| 16 | |
| 17 | func logSnowflakeQueryFailure(gj *core.GraphJin, gql string, vars json.RawMessage, err error) { |
| 18 | if dbType != "snowflake" || err == nil || gj == nil { |
| 19 | return |
| 20 | } |
| 21 | |
| 22 | fmt.Fprintf(os.Stderr, "\n[Snowflake debug] GraphQL execution error: %v\n", err) |
| 23 | if len(vars) != 0 { |
| 24 | fmt.Fprintf(os.Stderr, "[Snowflake debug] Variables: %s\n", string(vars)) |
| 25 | } |
| 26 | |
| 27 | exp, expErr := gj.ExplainQuery(gql, vars, "user") |
| 28 | if expErr != nil { |
| 29 | fmt.Fprintf(os.Stderr, "[Snowflake debug] ExplainQuery failed: %v\n", expErr) |
| 30 | return |
| 31 | } |
| 32 | |
| 33 | fmt.Fprintf(os.Stderr, "[Snowflake debug] Compiled SQL:\n%s\n", exp.CompiledQuery) |
| 34 | } |
| 35 | |
| 36 | func execSchemaDiffSQL(t *testing.T, sql string) { |
| 37 | t.Helper() |
no test coverage detected