zio-connect icon indicating copy to clipboard operation
zio-connect copied to clipboard

CassandraConnector - new connector

Open adrianfilip opened this issue 2 years ago • 3 comments

#Steps

  • [ ] Add a new project -- Example: https://github.com/zio/zio-connect/blob/2507925dcd9acf5cb1dbb5e004afef3982ad6807/build.sbt#L38

  • [ ] Create the following directory structure

       zio.connect.cassandra
    
  • [ ] Create the connector

     sealed trait CassandraConnector
    
     case class LiveCassandraConnector() extends CassandraConnector { ... }
    
     object LiveCassandraConnector {
         val layer: ZLayer[???, ???, CassandraConnector] = {
             ...
             LiveCassandraConnector()
         }
    
     }
    
  • [ ] Provide accessors in the package object Example: https://github.com/zio/zio-connect/blob/master/connectors/file-connector/src/main/scala/zio/connect/file/package.scala

  • [ ] Tests belong in the CassandraConnectorSpec file. They use the accessors. Example:- https://github.com/zio/zio-connect/blob/master/connectors/file-connector/src/test/scala/zio/connect/file/FileConnectorSpec.scala

  • [ ] There will be a LiveCassandraConnectorSpec that runs the CassandraConnectorSpec files for the LiveCassandraConnector layer You can use cassandra with testcontainers - https://www.testcontainers.org/modules/databases/cassandra/ Example with testcontainers and S3 here - https://github.com/zio/zio-connect/pull/83/files#diff-e7e0899e455a741a644a05c0b26879d176a9126951477cd7c62dc19ade98b5cc

  • [ ] Provide a TestCassandraConnector layer that allows testing with a stub. Example - https://github.com/zio/zio-connect/blob/master/connectors/file-connector/src/main/scala/zio/connect/file/TestFileConnector.scala

adrianfilip avatar Oct 09 '22 03:10 adrianfilip

Can I take this ticket?

sgeorgakis avatar Oct 27 '22 10:10 sgeorgakis

@sgeorgakis Yes. 🙏

adrianfilip avatar Oct 27 '22 11:10 adrianfilip

@adrianfilip It's been a long time since I started this issue and still I haven't made any progress. Is it still relevant? I want to get on with it sometime, but my priorities are different

sgeorgakis avatar May 02 '24 07:05 sgeorgakis