IndexesCreator

abstract class IndexesCreator

The IndexesCreator class is useful to create custom indexes in the tables made up the database of the system.

Author

N7ghtm4r3 - Tecknobit

Since

1.0.8

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val _ADD_FULLTEXT_INDEX_: String = " ADD FULLTEXT INDEX %s ("
_ADD_FULLTEXT_INDEX_ query command
Link copied to clipboard
val _IN_BOOLEAN_MODE: String = " IN BOOLEAN MODE"
_IN_BOOLEAN_MODE the mode applied to the FTS (full text search)
Link copied to clipboard
val _IN_NATURAL_LANGUAGE_MODE: String = " IN NATURAL LANGUAGE MODE"
_IN_NATURAL_LANGUAGE_MODE the mode applied to the FTS (full text search)
Link copied to clipboard
protected val _KEY_NAME: String = "Key_name='"
_KEY_NAME query part
Link copied to clipboard
val ALTER_TABLE_: String = "ALTER TABLE "
ALTER_TABLE_ query command
Link copied to clipboard
protected open var entityManager: EntityManager
entityManager entity manager helper
Link copied to clipboard
val SHOW_INDEX_FROM_: String = "SHOW INDEX FROM "
SHOW_INDEX_FROM_ query command

Functions

Link copied to clipboard
protected open fun assembleCreateIndexQuery(table: String, indexType: String, indexName: String, fields: List<String>): String
Method used to assemble the query to create an index
Link copied to clipboard
protected open fun createFullTextIndex(table: String, indexName: String, fields: List<String>)
Method used to create the full text index used in the Full Text Search (FTS)
Link copied to clipboard
protected open fun createIndex(table: String, indexName: String, indexType: String, fields: List<String>)
Method used to create an index in the specified table
Link copied to clipboard
abstract fun createIndexes()
Method used to create the custom indexes
Link copied to clipboard
open fun formatFullTextKeywords(keywords: Collection<String>, escapeDoubleQuotes: Boolean): String
open fun formatFullTextKeywords(keywords: Collection<String>, trailingCharacter: String, escapeDoubleQuotes: Boolean): String
open fun formatFullTextKeywords(    keywords: Collection<String>,     leadingCharacter: String,     trailingCharacter: String,     escapeDoubleQuotes: Boolean): String
Method used to format the keywords to use in the query for a full text search