From fa8baf35fca28f6571b5bd494b06997d4094279f Mon Sep 17 00:00:00 2001 From: cdtjj <34806335@qq.com> Date: Fri, 22 Apr 2022 01:48:29 +0000 Subject: [PATCH] =?UTF-8?q?Firebird=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84Key?= =?UTF-8?q?Generator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FirebirdKeyGenerator | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 FirebirdKeyGenerator diff --git a/FirebirdKeyGenerator b/FirebirdKeyGenerator new file mode 100644 index 0000000..060d8a8 --- /dev/null +++ b/FirebirdKeyGenerator @@ -0,0 +1,22 @@ +package com.baomidou.mybatisplus.extension.incrementer; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.baomidou.mybatisplus.annotation.DbType; + +import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator; + +public class FirebirdKeyGenerator implements IKeyGenerator { + @Override + public String executeSql(String incrementerName) { + // TODO Auto-generated method stub + return "SELECT next value for " + incrementerName + " from rdb$database"; + } + + @Override + public DbType dbType() { + // TODO Auto-generated method stub + return DbType.FIREBIRD; + } +} -- Gitee