class PostgresJDBCDatabase extends DatabaseInterface
A Postgres Database backed by JDBC which uses the Postgres COPY command to insert data into the database. Note that since this uses JDBC and CopyManager, its implementation is blocking under the hood.
- Alphabetic
- By Inheritance
- PostgresJDBCDatabase
- DatabaseInterface
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new PostgresJDBCDatabase()(implicit executionContext: ExecutionContext, materializer: Materializer, conn: Connection)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def streamInsert(kafkaStorageSource: Source[ReducedConsumerRecord, NotUsed], encodeKafkaRowToByteString: Flow[ReducedConsumerRecord, ByteString, NotUsed]): Future[Long]
Inserts data into a Postgres Database using the COPY method (see https://www.postgresql.org/docs/9.4/sql-copy.html).
Inserts data into a Postgres Database using the COPY method (see https://www.postgresql.org/docs/9.4/sql-copy.html). This means the data insertion is buffered and also extremely fast since it bypasses internal parts of the Postgres engine which are not necessary.
Since it uses JDBC plus
java.io.InputStream
under the hood, the operation is inherently blocking even though it returns ascala.concurrent.Future
. Due to this we have used blocking IO dispatchers to avoid problems that are typical of blocking IO- returns
Number of rows updated
- Definition Classes
- PostgresJDBCDatabase → DatabaseInterface
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])