Package com.mysql.cj.xdevapi
Class CreateIndexParams.IndexField
java.lang.Object
com.mysql.cj.xdevapi.CreateIndexParams.IndexField
- Enclosing class:
- CreateIndexParams
public static class CreateIndexParams.IndexField
extends java.lang.Object
Internally used object parsed from indexDefinition; see
Collection.createIndex(String, DbDoc)
description.-
Constructor Summary
Constructors Constructor Description IndexField(DbDoc indexField)
Constructor. -
Method Summary
Modifier and Type Method Description java.lang.String
getField()
Get the full document path to the document member or field to be indexed.java.lang.Integer
getOptions()
Get options for decoding GEOJSON data.java.lang.Integer
getSrid()
Get srid for decoding GEOJSON data.java.lang.String
getType()
Get column type.java.lang.Boolean
isArray()
Is the field an array?java.lang.Boolean
isRequired()
Is the field required to exist in the document?
-
Constructor Details
-
IndexField
Constructor.- Parameters:
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
-
-
Method Details
-
getField
public java.lang.String getField()Get the full document path to the document member or field to be indexed.- Returns:
- field string
-
getType
public java.lang.String getType()Get column type.- Returns:
- column type
-
isRequired
public java.lang.Boolean isRequired()Is the field required to exist in the document?- Returns:
- true if required
-
getOptions
public java.lang.Integer getOptions()Get options for decoding GEOJSON data.- Returns:
- options
-
getSrid
public java.lang.Integer getSrid()Get srid for decoding GEOJSON data.- Returns:
- srid
-
isArray
public java.lang.Boolean isArray()Is the field an array?- Returns:
- true if the field is an array
-