-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: support openGuass and GuassDB in AT mode #6020
base: 2.x
Are you sure you want to change the base?
Changes from all commits
c5be9cf
27b927c
1e7fc83
37405cf
554e658
bbc3eb0
44b0c75
8c4a3d1
1016788
9173060
6ba3ac5
bf6203e
036d6de
311d23f
920e683
35dcf79
386df09
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.seata.core.store.db.sql.lock; | ||
|
||
import io.seata.common.loader.LoadLevel; | ||
|
||
/** | ||
* the database lock store GaussDB sql | ||
* | ||
*/ | ||
@LoadLevel(name = "gaussdb") | ||
public class GaussDBLockStoreSql extends PostgresqlLockStoreSql { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.seata.core.store.db.sql.log; | ||
|
||
import io.seata.common.loader.LoadLevel; | ||
|
||
/** | ||
* Database log store GaussDB sql | ||
* | ||
*/ | ||
@LoadLevel(name = "gaussdb") | ||
public class GaussDBLogStoreSqls extends PostgresqlLogStoreSqls { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,8 +108,9 @@ | |
<postgresql.version>42.3.3</postgresql.version> | ||
<h2.version>1.4.181</h2.version> | ||
<mariadb.version>2.7.2</mariadb.version> | ||
<opengauss.version>5.0.0-og</opengauss.version> | ||
<!-- db connection pool --> | ||
<druid.version>1.2.7</druid.version> | ||
<druid.version>1.2.12</druid.version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why upgrade the druid version, Is there any compatibility issue between this database and Druid? |
||
<commons-dbcp2.version>2.9.0</commons-dbcp2.version> | ||
<hikari.version>3.4.3</hikari.version> | ||
<!-- sql parser --> | ||
|
@@ -226,6 +227,11 @@ | |
<artifactId>DmJdbcDriver18</artifactId> | ||
<version>${dm.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.opengauss</groupId> | ||
<artifactId>opengauss-jdbc</artifactId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. check license as `BSD 2-clause’ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<version>${opengauss.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mariadb.jdbc</groupId> | ||
<artifactId>mariadb-java-client</artifactId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.seata.rm.datasource.exec.gaussdb; | ||
|
||
import io.seata.common.loader.LoadLevel; | ||
import io.seata.common.loader.Scope; | ||
import io.seata.rm.datasource.StatementProxy; | ||
import io.seata.rm.datasource.exec.StatementCallback; | ||
import io.seata.rm.datasource.exec.postgresql.PostgresqlInsertExecutor; | ||
import io.seata.sqlparser.SQLRecognizer; | ||
import io.seata.sqlparser.util.JdbcConstants; | ||
|
||
/** | ||
* The type GaussDB insert executor. | ||
* | ||
*/ | ||
@LoadLevel(name = JdbcConstants.GAUSSDB, scope = Scope.PROTOTYPE) | ||
public class GaussDBInsertExecutor extends PostgresqlInsertExecutor { | ||
|
||
/** | ||
* Instantiates a new Abstract dml base executor. | ||
* | ||
* @param statementProxy the statement proxy | ||
* @param statementCallback the statement callback | ||
* @param sqlRecognizer the sql recognizer | ||
*/ | ||
public GaussDBInsertExecutor(StatementProxy statementProxy, StatementCallback statementCallback, SQLRecognizer sqlRecognizer) { | ||
super(statementProxy, statementCallback, sqlRecognizer); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.seata.rm.datasource.sql.handler.gaussdb; | ||
|
||
import io.seata.common.loader.LoadLevel; | ||
import io.seata.rm.datasource.sql.handler.postgresql.PostgresqlEscapeHandler; | ||
import io.seata.sqlparser.util.JdbcConstants; | ||
|
||
/** | ||
* The type GaussDB escape handler. | ||
* | ||
*/ | ||
@LoadLevel(name = JdbcConstants.GAUSSDB) | ||
public class GaussDBEscapeHandler extends PostgresqlEscapeHandler { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.seata.rm.datasource.sql.struct.cache; | ||
|
||
import io.seata.common.loader.LoadLevel; | ||
import io.seata.sqlparser.util.JdbcConstants; | ||
|
||
/** | ||
* The type Table meta cache. | ||
* | ||
*/ | ||
@LoadLevel(name = JdbcConstants.GAUSSDB) | ||
public class GaussDBTableMetaCache extends PostgresqlTableMetaCache { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.seata.rm.datasource.undo.gaussdb; | ||
|
||
import io.seata.rm.datasource.undo.SQLUndoLog; | ||
import io.seata.rm.datasource.undo.postgresql.PostgresqlUndoDeleteExecutor; | ||
import io.seata.sqlparser.util.JdbcConstants; | ||
|
||
/** | ||
* The type GaussDB undo delete executor. | ||
* | ||
*/ | ||
public class GaussDBUndoDeleteExecutor extends PostgresqlUndoDeleteExecutor { | ||
|
||
/** | ||
* Instantiates a new GaussDB undo delete executor. | ||
* | ||
* @param sqlUndoLog the sql undo log | ||
*/ | ||
public GaussDBUndoDeleteExecutor(SQLUndoLog sqlUndoLog) { | ||
super(sqlUndoLog); | ||
} | ||
|
||
@Override | ||
public String getDbType() { | ||
return JdbcConstants.GAUSSDB; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.seata.rm.datasource.undo.gaussdb; | ||
|
||
import io.seata.common.loader.LoadLevel; | ||
import io.seata.rm.datasource.undo.AbstractUndoExecutor; | ||
import io.seata.rm.datasource.undo.SQLUndoLog; | ||
import io.seata.rm.datasource.undo.UndoExecutorHolder; | ||
import io.seata.sqlparser.util.JdbcConstants; | ||
|
||
/** | ||
* Undo executor holder for GaussDB | ||
* | ||
*/ | ||
@LoadLevel(name = JdbcConstants.GAUSSDB) | ||
public class GaussDBUndoExecutorHolder implements UndoExecutorHolder { | ||
|
||
@Override | ||
public AbstractUndoExecutor getInsertExecutor(SQLUndoLog sqlUndoLog) { | ||
return new GaussDBUndoInsertExecutor(sqlUndoLog); | ||
} | ||
|
||
@Override | ||
public AbstractUndoExecutor getUpdateExecutor(SQLUndoLog sqlUndoLog) { | ||
return new GaussDBUndoUpdateExecutor(sqlUndoLog); | ||
} | ||
|
||
@Override | ||
public AbstractUndoExecutor getDeleteExecutor(SQLUndoLog sqlUndoLog) { | ||
return new GaussDBUndoDeleteExecutor(sqlUndoLog); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why upgrade the druid version, Is there any compatibility issue between this database and Druid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Druid 1.2.12 is the lowest supported version of openGauss