MCPcopy Create free account
hub / github.com/instantdb/instant / debug_query

Method debug_query

client/packages/python/src/instantdb/_sync/client.py:109–131  ·  view source on GitHub ↗
(
        self,
        q: dict[str, Any],
        *,
        rules: dict[str, Any] | None = None,
        rule_params: dict[str, Any] | None = None,
    )

Source from the content-addressed store, hash-verified

107 )
108
109 def debug_query(
110 self,
111 q: dict[str, Any],
112 *,
113 rules: dict[str, Any] | None = None,
114 rule_params: dict[str, Any] | None = None,
115 ) -> dict[str, Any]:
116 self._require_impersonation("debug_query")
117 if rule_params is not None:
118 q = {"$$ruleParams": rule_params, **q}
119 body: dict[str, Any] = {"query": q, "inference?": False}
120 if rules is not None:
121 body["rules-override"] = rules
122 response = self._http.post(
123 "/admin/query_perms_check",
124 params={"app_id": self._app_id},
125 json=body,
126 )
127 # Reshape kebab-case check-results to match the JS SDK's return shape.
128 return {
129 "result": response.get("result"),
130 "check_results": response.get("check-results"),
131 }
132
133 def debug_transact(
134 self,

Calls 3

postMethod · 0.45
getMethod · 0.45