Interface IDbService

All Superinterfaces:
IDbDialect, icu.easyj.core.dialect.IDialect, Serializable
All Known Implementing Classes:
CommonDbServiceImpl

public interface IDbService extends IDbDialect
数据库服务接口
Author:
wangliang181230
  • Method Details

    • getDataSource

      DataSource getDataSource()
      获取对应的数据源
      Returns:
      对应的数据源
    • getVersion

      @NonNull default String getVersion()
      获取数据库版本号
      Returns:
      数据库版本号
    • currentTimeMillis

      default long currentTimeMillis()
      获取数据库的当前时间戳
      Returns:
      数据库当前时间戳
    • now

      @NonNull default Date now()
      获取数据库的当前时间
      Returns:
      数据库当前时间
    • seqCurrVal

      default long seqCurrVal(String seqName)
      获取当前序列值
      Parameters:
      seqName - 序列名
      Returns:
      当前序列值
      Throws:
      icu.easyj.core.exception.NotSupportedException - 部分实现无法设置序列值,将抛出该异常
    • seqNextVal

      default long seqNextVal(String seqName)
      获取下一序列值
      Parameters:
      seqName - 序列名
      Returns:
      下一序列值
    • seqSetVal

      default long seqSetVal(String seqName, long newVal)
      设置序列值,并返回原序列值
      Parameters:
      seqName - 序列名
      newVal - 新的序列值
      Returns:
      previousVal 前序列值
      Throws:
      icu.easyj.core.exception.NotSupportedException - 部分实现无法设置序列值,将抛出该异常