All Downloads are FREE. Search and download functionalities are using the official Maven repository.

molecule.sql.mariadb.spi.SpiZioBase_mariadb.scala Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
package molecule.sql.mariadb.spi

import molecule.base.error._
import molecule.boilerplate.ast.Model._
import molecule.core.spi.{Conn, Renderer, SpiZio}
import molecule.sql.mariadb.query.Model2SqlQuery_mariadb
import zio.ZIO

trait SpiZioBase_mariadb extends Renderer { spi: SpiZio =>

  protected def printInspectQuery(
    label: String,
    elements: List[Element]
  ): ZIO[Conn, MoleculeError, Unit] = {
    for {
      conn <- ZIO.service[Conn]
      _ <- ZIO.succeed {
        val query = new Model2SqlQuery_mariadb(elements).getSqlQuery(Nil, None, None, Some(conn.proxy))
        printRaw(label, Nil, query)
      }
    } yield ()
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy