File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\expression\FunctionCall.java.html

1 /*
2 * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
3 * Version 1.0, and under the Eclipse Public License, Version 1.0
4 * (http://h2database.com/html/license.html).
5 * Initial Developer: H2 Group
6 */
7 package org.h2.expression;
8
9 import org.h2.engine.Session;
10 import org.h2.value.ValueResultSet;
11
12 /**
13 * This interface is used by the built-in functions,
14 * as well as the user-defined functions.
15 */
16 public interface FunctionCall {
17
18 /**
19 * Get the name of the function.
20 *
21 * @return the name
22 */
23 String getName();
24
25 /**
26 * Get the number of parameters.
27 *
28 * @return the number of parameters
29 */
30 int getParameterCount();
31
32 /**
33 * Get an empty result set with the column names set.
34 *
35 * @param session the session
36 * @param nullArgs the argument list (some arguments may be null)
37 * @return the empty result set
38 */
39 ValueResultSet getValueForColumnList(Session session, Expression[] nullArgs);
40
41 /**
42 * Get the data type.
43 *
44 * @return the data type
45 */
46 int getType();
47
48 /**
49 * Optimize the function if possible.
50 *
51 * @param session the session
52 * @return the optimized expression
53 */
54 Expression optimize(Session session);
55
56 /**
57 * Get the function arguments.
58 *
59 * @return argument list
60 */
61 Expression[] getArgs();
62
63 /**
64 * Get the SQL snippet of the function (including arguments).
65 *
66 * @return the SQL snippet.
67 */
68 String getSQL();
69
70 /**
71 * Whether the function always returns the same result for the same parameters.
72 *
73 * @return true if it does
74 */
75 boolean isDeterministic();
76
77 /**
78 * Whether the function is fast, meaning the result shouldn't be cached.
79 *
80 * @return true if it is
81 */
82 boolean isFast();
83
84 }
85