类 ExprUtil
- java.lang.Object
-
- com.mysql.cj.xdevapi.ExprUtil
-
public class ExprUtil extends Object
Utilities to deal with Expr (and related) structures.
-
-
构造器概要
构造器 构造器 说明 ExprUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static MysqlxDatatypes.AnyanyOf(MysqlxDatatypes.Scalar s)Protocol buffers helper to build an Any Scalar type.static MysqlxExpr.ExprargObjectToExpr(Object value, boolean allowRelationalColumns)Protocol buffers helper to build Expr with any object.static MysqlxDatatypes.ScalarargObjectToScalar(Object value)Protocol buffers helper to build a Scalar type with any object.static MysqlxDatatypes.AnyargObjectToScalarAny(Object value)Protocol buffers helper to build an Any type with any object.static MysqlxDatatypes.AnybuildAny(boolean b)Build a Protocol buffers Any with a boolean value.static MysqlxDatatypes.AnybuildAny(String str)Build a Protocol buffers Any with a string value.static MysqlxCrud.CollectionbuildCollection(String schemaName, String collectionName)Build a Protocol buffers Collection.static MysqlxExpr.ExprbuildLiteralExpr(MysqlxDatatypes.Scalar scalar)Wrap an Any value in a LITERAL expression.static MysqlxExpr.ExprbuildLiteralNullScalar()Protocol buffers helper to build a LITERAL Expr with a Scalar NULL type.static MysqlxExpr.ExprbuildLiteralScalar(boolean b)Protocol buffers helper to build a LITERAL Expr with a Scalar BOOL type.static MysqlxExpr.ExprbuildLiteralScalar(byte[] bytes)Protocol buffers helper to build a LITERAL Expr with a Scalar OCTETS type.static MysqlxExpr.ExprbuildLiteralScalar(double d)Protocol buffers helper to build a LITERAL Expr with a Scalar DOUBLE type.static MysqlxExpr.ExprbuildLiteralScalar(long l)Protocol buffers helper to build a LITERAL Expr with a Scalar SINT (signed int) type.static MysqlxExpr.ExprbuildLiteralScalar(String str)Protocol buffers helper to build a LITERAL Expr with a Scalar STRING type.static MysqlxExpr.ExprbuildPlaceholderExpr(int pos)Creates a placeholder expression for the given position in theargsarraystatic MysqlxDatatypes.ScalarnullScalar()Protocol buffers helper to build a Scalar NULL type.static MysqlxDatatypes.ScalarscalarOf(boolean b)Protocol buffers helper to build a Scalar BOOL type.static MysqlxDatatypes.ScalarscalarOf(byte[] bytes)Protocol buffers helper to build a Scalar OCTETS type.static MysqlxDatatypes.ScalarscalarOf(double d)Protocol buffers helper to build a Scalar DOUBLE type.static MysqlxDatatypes.ScalarscalarOf(long l)Protocol buffers helper to build a Scalar SINT (signed int) type.static MysqlxDatatypes.ScalarscalarOf(String str)Protocol buffers helper to build a Scalar STRING type.
-
-
-
方法详细资料
-
buildLiteralNullScalar
public static MysqlxExpr.Expr buildLiteralNullScalar()
Protocol buffers helper to build a LITERAL Expr with a Scalar NULL type.- 返回:
MysqlxExpr.Expr
-
buildLiteralScalar
public static MysqlxExpr.Expr buildLiteralScalar(double d)
Protocol buffers helper to build a LITERAL Expr with a Scalar DOUBLE type.- 参数:
d- value- 返回:
MysqlxExpr.Expr
-
buildLiteralScalar
public static MysqlxExpr.Expr buildLiteralScalar(long l)
Protocol buffers helper to build a LITERAL Expr with a Scalar SINT (signed int) type.- 参数:
l- value- 返回:
MysqlxExpr.Expr
-
buildLiteralScalar
public static MysqlxExpr.Expr buildLiteralScalar(String str)
Protocol buffers helper to build a LITERAL Expr with a Scalar STRING type.- 参数:
str- value- 返回:
MysqlxExpr.Expr
-
buildLiteralScalar
public static MysqlxExpr.Expr buildLiteralScalar(byte[] bytes)
Protocol buffers helper to build a LITERAL Expr with a Scalar OCTETS type.- 参数:
bytes- value- 返回:
MysqlxExpr.Expr
-
buildLiteralScalar
public static MysqlxExpr.Expr buildLiteralScalar(boolean b)
Protocol buffers helper to build a LITERAL Expr with a Scalar BOOL type.- 参数:
b- value- 返回:
MysqlxExpr.Expr
-
buildLiteralExpr
public static MysqlxExpr.Expr buildLiteralExpr(MysqlxDatatypes.Scalar scalar)
Wrap an Any value in a LITERAL expression.- 参数:
scalar-MysqlxDatatypes.Scalar- 返回:
MysqlxExpr.Expr
-
buildPlaceholderExpr
public static MysqlxExpr.Expr buildPlaceholderExpr(int pos)
Creates a placeholder expression for the given position in theargsarray- 参数:
pos- the position of the placeholder in theargsarray- 返回:
MysqlxExpr.Expr
-
nullScalar
public static MysqlxDatatypes.Scalar nullScalar()
Protocol buffers helper to build a Scalar NULL type.
-
scalarOf
public static MysqlxDatatypes.Scalar scalarOf(double d)
Protocol buffers helper to build a Scalar DOUBLE type.- 参数:
d- value- 返回:
MysqlxDatatypes.Scalar
-
scalarOf
public static MysqlxDatatypes.Scalar scalarOf(long l)
Protocol buffers helper to build a Scalar SINT (signed int) type.- 参数:
l- value- 返回:
MysqlxDatatypes.Scalar
-
scalarOf
public static MysqlxDatatypes.Scalar scalarOf(String str)
Protocol buffers helper to build a Scalar STRING type.- 参数:
str- value- 返回:
MysqlxDatatypes.Scalar
-
scalarOf
public static MysqlxDatatypes.Scalar scalarOf(byte[] bytes)
Protocol buffers helper to build a Scalar OCTETS type.- 参数:
bytes- value- 返回:
MysqlxDatatypes.Scalar
-
scalarOf
public static MysqlxDatatypes.Scalar scalarOf(boolean b)
Protocol buffers helper to build a Scalar BOOL type.- 参数:
b- value- 返回:
MysqlxDatatypes.Scalar
-
anyOf
public static MysqlxDatatypes.Any anyOf(MysqlxDatatypes.Scalar s)
Protocol buffers helper to build an Any Scalar type.- 参数:
s- value- 返回:
MysqlxDatatypes.Any
-
buildAny
public static MysqlxDatatypes.Any buildAny(String str)
Build a Protocol buffers Any with a string value.- 参数:
str- value- 返回:
MysqlxDatatypes.Any
-
buildAny
public static MysqlxDatatypes.Any buildAny(boolean b)
Build a Protocol buffers Any with a boolean value.- 参数:
b- value- 返回:
MysqlxDatatypes.Any
-
buildCollection
public static MysqlxCrud.Collection buildCollection(String schemaName, String collectionName)
Build a Protocol buffers Collection.- 参数:
schemaName- schema namecollectionName- collection name- 返回:
MysqlxCrud.Collection
-
argObjectToScalar
public static MysqlxDatatypes.Scalar argObjectToScalar(Object value)
Protocol buffers helper to build a Scalar type with any object.- 参数:
value- value- 返回:
MysqlxDatatypes.Scalar
-
argObjectToScalarAny
public static MysqlxDatatypes.Any argObjectToScalarAny(Object value)
Protocol buffers helper to build an Any type with any object.- 参数:
value- value- 返回:
MysqlxDatatypes.Any
-
argObjectToExpr
public static MysqlxExpr.Expr argObjectToExpr(Object value, boolean allowRelationalColumns)
Protocol buffers helper to build Expr with any object.- 参数:
value- valueallowRelationalColumns- Are relational columns identifiers allowed?- 返回:
MysqlxExpr.Expr
-
-