File tree Expand file tree Collapse file tree 4 files changed +25
-7
lines changed
src/com/yanglb/utilitys/codegen/core/translator Expand file tree Collapse file tree 4 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 2727import com .yanglb .utilitys .codegen .support .SupportLang ;
2828import com .yanglb .utilitys .codegen .utility .StringUtility ;
2929
30- public class BaseDdlTranslator extends BaseTranslator <List <DdlModel >> {
30+ public class BaseDdlTranslator extends BaseSqlTranslator <List <DdlModel >> {
3131 // 外键关系列表
3232 protected List <ForeignModel > foreignKeyList = new ArrayList <ForeignModel >();
3333
Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright 2020 yanglb.com
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package com .yanglb .utilitys .codegen .core .translator ;
17+
18+ public class BaseSqlTranslator <T > extends BaseTranslator <T > {
19+ // 列引号字符,如:SQL Server为[], MySQL为`等
20+ protected String sqlColumnStart = "\" " ;
21+ protected String sqlColumnEnd = "\" " ;
22+ }
Original file line number Diff line number Diff line change @@ -32,10 +32,6 @@ public class BaseTranslator<T> implements ITranslator<T> {
3232 protected HashMap <String , String > settingMap ;
3333 protected ParamaModel paramaModel ;
3434
35- // 列引号字符,如:SQL Server为[], MySQL为`等
36- protected String sqlColumnStart = "\" " ;
37- protected String sqlColumnEnd = "\" " ;
38-
3935 protected BaseTranslator () {
4036 this .writableModel = new WritableModel ();
4137 }
Original file line number Diff line number Diff line change 2121
2222import com .yanglb .utilitys .codegen .core .model .DmlModel ;
2323import com .yanglb .utilitys .codegen .core .model .TableModel ;
24- import com .yanglb .utilitys .codegen .core .translator .BaseTranslator ;
24+ import com .yanglb .utilitys .codegen .core .translator .BaseSqlTranslator ;
2525import com .yanglb .utilitys .codegen .exceptions .CodeGenException ;
2626import com .yanglb .utilitys .codegen .support .SupportLang ;
2727import com .yanglb .utilitys .codegen .utility .StringUtility ;
2828
29- public class DmlTranslatorImpl extends BaseTranslator <List <DmlModel >> {
29+ public class DmlTranslatorImpl extends BaseSqlTranslator <List <DmlModel >> {
3030 @ Override
3131 protected void onBeforeTranslate () throws CodeGenException {
3232 super .onBeforeTranslate ();
You can’t perform that action at this time.
0 commit comments