MCPcopy Create free account
hub / github.com/crate/crate / analyze

Method analyze

server/src/main/java/io/crate/session/Session.java:370–401  ·  view source on GitHub ↗
(String statementName,
                        Statement statement,
                        List<DataType<?>> paramTypes,
                        @Nullable String query,
                        TimeoutToken timeoutToken)

Source from the content-addressed store, hash-verified

368 }
369
370 public void analyze(String statementName,
371 Statement statement,
372 List<DataType<?>> paramTypes,
373 @Nullable String query,
374 TimeoutToken timeoutToken) {
375 AnalyzedStatement analyzedStatement;
376 DataType<?>[] parameterTypes;
377 try {
378 analyzedStatement = analyzer.analyze(
379 statement,
380 sessionSettings,
381 new ParamTypeHints(paramTypes),
382 cursors
383 );
384
385 parameterTypes = ParameterTypes.extract(analyzedStatement).toArray(new DataType[0]);
386 timeoutToken.check("analyze");
387 } catch (Throwable t) {
388 jobsLogs.logPreExecutionFailure(
389 UUIDs.dirtyUUID(),
390 id,
391 query == null ? statementName : query,
392 SQLExceptions.messageOf(t),
393 sessionSettings.sessionUser());
394 throw t;
395 }
396
397 timeoutToken.disable();
398 preparedStatements.put(
399 statementName,
400 new PreparedStmt(statement, analyzedStatement, query, parameterTypes, timeoutToken));
401 }
402
403 public void bind(String portalName,
404 String statementName,

Callers 4

parseMethod · 0.95
quickExecMethod · 0.45
createMethod · 0.45
handleSingleQueryMethod · 0.45

Calls 9

extractMethod · 0.95
dirtyUUIDMethod · 0.95
messageOfMethod · 0.95
sessionUserMethod · 0.80
checkMethod · 0.65
putMethod · 0.65
toArrayMethod · 0.45
disableMethod · 0.45

Tested by

no test coverage detected