Package io.github.torand.fastersql.sql
Interface Sql
- All Known Subinterfaces:
AggregateFunction,Alias,ColumnFunction,Constant,Expression,Function,LeftOperand,Order,OrderExpression,Predicate,PreparableStatement,Projection,Relation,SingleRowFunction,Subquery,SystemFunction
- All Known Implementing Classes:
Abs,Addition,And,Ascending,Avg,Between,Cast,Ceil,Column,ColumnAlias,ColumnPosition,ColumnRef,Concat,Count,CountAll,CurrentDate,CurrentTime,CurrentTimestamp,DeleteStatement,Descending,Division,Eq,ExistsSubquery,Exp,ExpressionSubquery,Floor,Ge,GenericConstant,Gt,In,InlineNumberConstant,InlineStringConstant,InsertBatchStatement,InsertStatement,InSubquery,IsNull,Join,Le,Length,Like,Ln,Lower,Lt,Max,Min,Modulo,Multiplication,Ne,Negate,Not,NullConstant,Or,Power,Round,SearchedCase,SelectSetOpStatement,SelectStatement,SetOperation,SimpleCase,Sqrt,Substring,Subtraction,Sum,Table,TableAlias,TableModel,TableSubquery,ToChar,ToNumber,TruncateStatement,UpdateStatement,Upper
public interface Sql
Defines a construct that can be expressed as an SQL fragment.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Stream<ColumnAlias> Gets the column aliases referenced by this fragment.Gets the columns referenced by this fragment.Gets the statement parameters introduced by this fragment.Formats object as an SQL fragment.
-
Method Details
-
sql
Formats object as an SQL fragment.- Parameters:
context- the context (incl. dialect).- Returns:
- the formatted SQL fragment.
-
params
Gets the statement parameters introduced by this fragment.- Parameters:
context- the context (incl. dialect).- Returns:
- the statement parameters.
-
columnRefs
Gets the columns referenced by this fragment. For validation purposes.- Returns:
- the columns referenced by this fragment.
-
aliasRefs
Gets the column aliases referenced by this fragment. For validation purposes.- Returns:
- the column aliases referenced by this fragment.
-