SQL — User Accessible Java Classes

As of BBj 19.10, this information has been superseded.
See SQL - Custom Functions for current information.


The BASIS DBMS exploits the power and scalability provided by the Java programming language by giving users the ability to extend the functionality of the BASIS DBMS in a variety of ways. For information on what features may be extended, please refer to the primary documentation under SQL - Custom Functions, Custom Date Formats, and Custom Aggregate Functions. This topic lists the Java BASIS classes that must be used when creating custom functions and date formats.

com.basis.sql.expression.Expression

(Used in custom scalar and aggregate functions)

This class is the abstract base class for all expressions used by the SQL engine in the BASIS DBMS. An expression consists of one or more expressions that are joined by a mathematical operator and can be evaluated. For example, in the SQL statement:

SELECT description AS "Description", price + (price * tax_rate) AS "Total Price"
FROM order_line

"description" is an expression and "price + (price * tax_rate)" is an aggregate expression consisting of several individual expressions.

All values that are used by the SQL engine are called expressions, including column values, numbers (literal expressions), scalar functions, aggregate functions, and nested SELECT statements. Once a record is fetched from the result set in a SELECT statement, the expressions have enough information to be evaluated. Eventually all expressions will return a literal expression – an expression that contains an actual number or value (see com.basis.sql.expression.LiteralExpression for details about literal expressions and how to get values out of them).

com.basis.sql.expression.LiteralExpression

(Used in custom scalar and aggregate functions)

This class contains a value that is completely evaluated such as a string, number, or date. Literal expressions are ready to be used to retrieve values. It is possible to retrieve the value contained in a literal expression in any compatible format. For example, a literal expression containing the number "15" can be retrieved as an integer, double, float, BigDecimal, byte, or string.