MCPcopy Index your code
hub / github.com/dosco/graphjin / logSnowflakeQueryFailure

Function logSnowflakeQueryFailure

tests/snowflake_debug_test.go:17–34  ·  view source on GitHub ↗
(gj *core.GraphJin, gql string, vars json.RawMessage, err error)

Source from the content-addressed store, hash-verified

15}
16
17func 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
36func execSchemaDiffSQL(t *testing.T, sql string) {
37 t.Helper()

Calls 1

ExplainQueryMethod · 0.80

Tested by

no test coverage detected