Class ElasticsearchDb

java.lang.Object
io.inversion.Db<ElasticsearchDb>
io.inversion.elasticsearch.ElasticsearchDb

public class ElasticsearchDb extends io.inversion.Db<ElasticsearchDb>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final int[]
     
    final String
     
    int
     
    protected final int
     
    protected String
     

    Fields inherited from class io.inversion.Db

    bootstrap, collections, dryRun, endpointPath, excludeColumns, includeColumns, includeTables, log, name, reservedParams, type
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ElasticsearchDb(String elasticUrl)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected io.inversion.Collection
     
    void
     
    void
    delete(io.inversion.Collection table, List<Map<String,Object>> indexValues)
     
    protected void
    deleteRow(io.inversion.Collection collection, Map<String,Object> indexValues)
    Deletes a single specific resource.
    io.inversion.Results<io.inversion.utils.Rows.Row>
    doSelect(io.inversion.Collection table, List<io.inversion.rql.Term> columnMappedTerms)
     
    doUpsert(io.inversion.Collection table, List<Map<String,Object>> rows)
     
    org.elasticsearch.client.RestHighLevelClient
     
     
    upsertRow(io.inversion.Collection table, Map<String,Object> columnMappedTermsRow)
     
     

    Methods inherited from class io.inversion.Db

    beautifyCollectionName, beautifyName, buildCollections, buildRelationships, castDbOutput, castJsonInput, castJsonInput, configApi, doPatch, doShutdown, doShutdown, doStartup, filterOutJsonProperty, getCollectionByTableName, getCollections, getEndpointPath, getHref, getKey, getName, getProperty, getType, isBootstrap, isDryRun, isRunning, isType, makeRelationshipName, mapTo, mapToColumnNames, mapToJsonNames, patch, removeCollection, select, shutdown, shutdown, startup, upsert, withBootstrap, withCollection, withCollections, withDryRun, withEndpointPath, withExcludeColumns, withIncludeColumns, withIncludeTable, withIncludeTables, withName, withType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • defaultSource

      public final String defaultSource
    • maxRequestDuration

      protected final int maxRequestDuration
      See Also:
    • allowedFailResponseCodes

      protected final int[] allowedFailResponseCodes
    • maxElasticQuerySize

      public int maxElasticQuerySize
    • url

      protected String url
  • Constructor Details

    • ElasticsearchDb

      public ElasticsearchDb()
    • ElasticsearchDb

      public ElasticsearchDb(String elasticUrl)
    • ElasticsearchDb

      public ElasticsearchDb(String name, String url)
  • Method Details

    • getElasticClient

      public org.elasticsearch.client.RestHighLevelClient getElasticClient()
    • doSelect

      public io.inversion.Results<io.inversion.utils.Rows.Row> doSelect(io.inversion.Collection table, List<io.inversion.rql.Term> columnMappedTerms) throws io.inversion.ApiException
      Specified by:
      doSelect in class io.inversion.Db<ElasticsearchDb>
      Throws:
      io.inversion.ApiException
    • delete

      public void delete(io.inversion.Collection table, List<Map<String,Object>> indexValues) throws io.inversion.ApiException
      Specified by:
      delete in class io.inversion.Db<ElasticsearchDb>
      Throws:
      io.inversion.ApiException
    • deleteRow

      protected void deleteRow(io.inversion.Collection collection, Map<String,Object> indexValues) throws io.inversion.ApiException
      Deletes a single specific resource.
      Parameters:
      collection - the collection to delete from
      indexValues - identifiers for the records to delete
      Throws:
      io.inversion.ApiException
    • doUpsert

      public List doUpsert(io.inversion.Collection table, List<Map<String,Object>> rows) throws io.inversion.ApiException
      Specified by:
      doUpsert in class io.inversion.Db<ElasticsearchDb>
      Throws:
      io.inversion.ApiException
    • upsertRow

      public String upsertRow(io.inversion.Collection table, Map<String,Object> columnMappedTermsRow) throws io.inversion.ApiException
      Throws:
      io.inversion.ApiException
    • configDb

      public void configDb() throws io.inversion.ApiException
      Overrides:
      configDb in class io.inversion.Db<ElasticsearchDb>
      Throws:
      io.inversion.ApiException
    • buildCollection

      protected io.inversion.Collection buildCollection(String tableName)
    • getUrl

      public String getUrl()
    • withUrl

      public ElasticsearchDb withUrl(String url)