类 CreateIndexParams.IndexField
- java.lang.Object
-
- com.mysql.cj.xdevapi.CreateIndexParams.IndexField
-
- 封闭类:
- CreateIndexParams
public static class CreateIndexParams.IndexField extends Object
Internally used object parsed from indexDefinition; seeCollection.createIndex(String, DbDoc)description.
-
-
构造器概要
构造器 构造器 说明 IndexField(DbDoc indexField)Constructor.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetField()Get the full document path to the document member or field to be indexed.IntegergetOptions()Get options for decoding GEOJSON data.IntegergetSrid()Get srid for decoding GEOJSON data.StringgetType()Get column type.BooleanisArray()Is the field an array?BooleanisRequired()Is the field required to exist in the document?
-
-
-
构造器详细资料
-
IndexField
public IndexField(DbDoc indexField)
Constructor.- 参数:
indexField- a special JSON document, part of indexDefinition document, consisting of the following fields:- field: string, the full document path to the document member or field to be indexed
- type: string, one of the supported SQL column types to map the field into. For numeric types, the optional UNSIGNED keyword may follow. For the TEXT type, the length to consider for indexing may be added. Type descriptions are case insensitive.
- required: bool, (optional) true if the field is required to exist in the document. Defaults to false, except for GEOJSON where it defaults to true
- options: int, (optional) special option flags for use when decoding GEOJSON data
- srid: int, (optional) srid value for use when decoding GEOJSON data
- array: bool, (optional) true if the field is an array
-
-
方法详细资料
-
getField
public String getField()
Get the full document path to the document member or field to be indexed.- 返回:
- field string
-
getType
public String getType()
Get column type.- 返回:
- column type
-
isRequired
public Boolean isRequired()
Is the field required to exist in the document?- 返回:
- true if required
-
getOptions
public Integer getOptions()
Get options for decoding GEOJSON data.- 返回:
- options
-
getSrid
public Integer getSrid()
Get srid for decoding GEOJSON data.- 返回:
- srid
-
isArray
public Boolean isArray()
Is the field an array?- 返回:
- true if the field is an array
-
-