Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnu-liguobin committed Sep 6, 2023
1 parent 9fb2283 commit 155ab04
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ Usually, we use a session client, which can be conveniently used in ZIO applicat
import zio._
import zio.nebula._

final class NebulaSessionClientExample(nebulaSessionPool: NebulaSessionClient) {
final class NebulaSessionClientExample(sessionClient: NebulaSessionClient) {

def execute(stmt: String): ZIO[Any, Throwable, NebulaResultSet] = {
// Your business logic
nebulaSessionPool.execute(stmt)
sessionClient.execute(stmt)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import zio._
import zio.nebula._
import zio.nebula.net.{ NebulaClient, Stmt }

final class NebulaClientExample(nebulaPool: NebulaClient) {
final class NebulaClientExample(nebulaClient: NebulaClient) {

def execute(stmt: String): ZIO[Scope with NebulaSessionPoolConfig, Throwable, NebulaResultSet] =
nebulaPool.getSession.flatMap(_.execute(Stmt.str(stmt)))
nebulaClient.getSession.flatMap(_.execute(Stmt.str(stmt)))
}

object NebulaClientExample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import zio.nebula.meta._

import com.vesoft.nebula.meta.SpaceItem

final class NebulaMetaClientExample(nebulaMetaManager: NebulaMetaClient) {
final class NebulaMetaClientExample(metaClient: NebulaMetaClient) {

def getSpace(spaceName: String): Task[SpaceItem] =
nebulaMetaManager.getSpace(spaceName)
metaClient.getSpace(spaceName)
}

object NebulaMetaClientExample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package zio.nebula.example
import zio._
import zio.nebula._

final class NebulaSessionClientExample(nebulaSessionPool: NebulaSessionClient) {
final class NebulaSessionClientExample(sessionClient: NebulaSessionClient) {

def execute(stmt: String): ZIO[Any, Throwable, NebulaResultSet] =
nebulaSessionPool.execute(stmt)
sessionClient.execute(stmt)
}

object NebulaSessionClientExample {
Expand Down

0 comments on commit 155ab04

Please sign in to comment.