Class

com.crobox.clickhouse

ClickhouseClient

Related Doc: package clickhouse

Permalink

class ClickhouseClient extends ClickHouseExecutor with ClickhouseResponseParser with ClickhouseQueryBuilder

Async clickhouse client using Akka Http and Streams TODO remove the implicit ActorSystem and use own internal actor system + configuration

Since

31-03-17

Linear Supertypes
ClickhouseQueryBuilder, ClickhouseResponseParser, ClickHouseExecutor, LazyLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClickhouseClient
  2. ClickhouseQueryBuilder
  3. ClickhouseResponseParser
  4. ClickHouseExecutor
  5. LazyLogging
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ClickhouseClient(config: Config, database: String = "default")(implicit system: ActorSystem = ...)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. lazy val bufferSize: Int

    Permalink
    Attributes
    protected
    Definition Classes
    ClickHouseExecutor
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val config: Config

    Permalink
    Definition Classes
    ClickhouseClient → ClickHouseExecutor
  8. val database: String

    Permalink
  9. def decodeResponse(response: HttpResponse): HttpResponse

    Permalink
    Attributes
    protected
    Definition Classes
    ClickhouseResponseParser
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def execute(sql: String, entity: String)(implicit settings: QuerySettings): Future[String]

    Permalink
  13. def execute(sql: String)(implicit settings: QuerySettings = QuerySettings(AllQueries)): Future[String]

    Permalink

    Execute a query that is modifying the state of the database.

    Execute a query that is modifying the state of the database. e.g. INSERT, SET, CREATE TABLE. For security purposes SELECT and SHOW queries are not allowed, use the .query() method for those.

    sql

    a valid Clickhouse SQL string

    returns

    Future with the result that clickhouse returns

  14. def executeRequest(query: String, settings: QuerySettings, entity: Option[RequestEntity] = None, progressQueue: Option[SourceQueueWithComplete[QueryProgress]] = None): Future[String]

    Permalink
    Definition Classes
    ClickHouseExecutor
  15. def executeRequestInternal(host: Future[Uri], query: String, queryIdentifier: String, settings: QuerySettings, entity: Option[RequestEntity] = None, progressQueue: Option[SourceQueueWithComplete[QueryProgress]]): Future[String]

    Permalink
    Attributes
    protected
    Definition Classes
    ClickHouseExecutor
  16. def executeRequestWithProgress(query: String, settings: QuerySettings, entity: Option[RequestEntity] = None): Source[QueryProgress, Future[String]]

    Permalink
    Definition Classes
    ClickHouseExecutor
  17. implicit val executionContext: ExecutionContext

    Permalink
    Attributes
    protected
    Definition Classes
    ClickhouseClient → ClickHouseExecutor
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. val hostBalancer: HostBalancer

    Permalink
    Attributes
    protected
    Definition Classes
    ClickhouseClient → ClickHouseExecutor
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. lazy val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LazyLogging
  24. implicit lazy val materializer: Materializer

    Permalink
    Attributes
    protected
    Definition Classes
    ClickHouseExecutor
  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. def processClickhouseResponse(responseFuture: Future[HttpResponse], query: String, host: Uri, progressQueue: Option[SourceQueue[QueryProgress]])(implicit materializer: Materializer, executionContext: ExecutionContext): Future[String]

    Permalink
    Attributes
    protected
    Definition Classes
    ClickhouseResponseParser
  29. lazy val progressQueue: SourceQueueWithComplete[String]

    Permalink
    Definition Classes
    ClickHouseExecutor
  30. lazy val progressSource: Source[ClickhouseQueryProgress, NotUsed]

    Permalink
    Definition Classes
    ClickHouseExecutor
  31. def query(sql: String)(implicit settings: QuerySettings = QuerySettings(ReadQueries)): Future[String]

    Permalink

    Execute a read-only query on Clickhouse

    Execute a read-only query on Clickhouse

    sql

    a valid Clickhouse SQL string

    returns

    Future with the result that clickhouse returns

  32. def queryIdentifier: String

    Permalink
    Attributes
    protected
    Definition Classes
    ClickHouseExecutor
  33. def queryWithProgress(sql: String)(implicit settings: QuerySettings = QuerySettings(ReadQueries)): Source[QueryProgress, Future[String]]

    Permalink

    Execute a read-only query on Clickhouse Experimental api, may change in the future.

    Execute a read-only query on Clickhouse Experimental api, may change in the future.

    sql

    a valid Clickhouse SQL string

    returns

    stream with the query progress (started/rejected/finished/failed) which materializes with the query result

  34. def shutdown(): Future[Done]

    Permalink
    Definition Classes
    ClickHouseExecutor
  35. def singleRequest(request: HttpRequest): Future[HttpResponse]

    Permalink
    Attributes
    protected
    Definition Classes
    ClickHouseExecutor
  36. def sink(sql: String, source: Source[ByteString, Any])(implicit settings: QuerySettings = QuerySettings(AllQueries)): Future[String]

    Permalink

    Accepts a source of Strings that it will stream to Clickhouse It will not retry the query as this will run the source once for every retry and might have unexpected consequences.

    Accepts a source of Strings that it will stream to Clickhouse It will not retry the query as this will run the source once for every retry and might have unexpected consequences.

    sql

    a valid Clickhouse SQL INSERT statement

    source

    the Source with strings

    returns

    Future with the result that clickhouse returns

  37. def source(sql: String)(implicit settings: QuerySettings = QuerySettings(ReadQueries)): Source[String, NotUsed]

    Permalink

    Creates a stream of the SQL query that will delimit the result from Clickhouse on new-line

    Creates a stream of the SQL query that will delimit the result from Clickhouse on new-line

    sql

    a valid Clickhouse SQL string

  38. def sourceByteString(sql: String)(implicit settings: QuerySettings = QuerySettings(ReadQueries)): Source[ByteString, NotUsed]

    Permalink

    Creates a stream of the SQL query that will emit every result as a ByteString It will not retry the queries.

    Creates a stream of the SQL query that will emit every result as a ByteString It will not retry the queries.

    sql

    a valid Clickhouse SQL string

  39. def splitResponse(response: String): Seq[String]

    Permalink
    Attributes
    protected
    Definition Classes
    ClickhouseResponseParser
  40. lazy val superPoolSettings: ConnectionPoolSettings

    Permalink
    Definition Classes
    ClickHouseExecutor
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. implicit val system: ActorSystem

    Permalink
    Definition Classes
    ClickhouseClient → ClickHouseExecutor
  43. def table(name: String): String

    Permalink

    Resolves the table name relative to the current clickhouse client database.

    Resolves the table name relative to the current clickhouse client database.

    name

    name of the table

  44. def toRequest(uri: Uri, query: String, queryIdentifier: Option[String], settings: QuerySettings, entity: Option[RequestEntity])(config: Config): HttpRequest

    Permalink
    Attributes
    protected
    Definition Classes
    ClickhouseQueryBuilder
  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ClickhouseQueryBuilder

Inherited from ClickhouseResponseParser

Inherited from ClickHouseExecutor

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Ungrouped