SyncMySql
class SyncMySql
Class to Sync MySQL Database
Methods
Constructor
Set Database Connection.
Set Index to Use in Elasticsearch.
Set Type to use in Elasticsearch
Set Id column which will be set as ID in Elasticsearch index
Set sqlQuery to get data from database
Sync All data of MySQL in Elasticsearch.
Insert single data in Elasticsearch.
Update single data in Elasticsearch.
Delete single data from Elasticsearch.
Validation of $data.
Details
at line 29
void
__construct()
Constructor
at line 41
void
setConnection( $con)
Set Database Connection.
at line 51
void
setIndex(string $index)
Set Index to Use in Elasticsearch.
at line 62
void
setType(string $type)
Set Type to use in Elasticsearch
at line 73
void
setIdColumn(string $column)
Set Id column which will be set as ID in Elasticsearch index
at line 84
void
setSqlQuery(string $sqlQuery)
Set sqlQuery to get data from database
at line 96
ElasticSearchClient
insertAllData($con, $tableName = null)
Sync All data of MySQL in Elasticsearch.
at line 133
ElasticSearchClient
insertNode($con, $insertId, $tableName = null)
Insert single data in Elasticsearch.
at line 160
ElasticSearchClient
updateNode($con, $insertId, $tableName = null)
Update single data in Elasticsearch.
at line 189
ElasticSearchClient
deleteNode(int $id)
Delete single data from Elasticsearch.
at line 208
protected ElasticSearchClient
validate(array $data = null)
Validation of $data.