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

com.zhuang.data.orm.sql.OracleSqlBuilder Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package com.zhuang.data.orm.sql;

import com.zhuang.data.enums.DbDialect;
import com.zhuang.data.mybatis.util.JdbcTypeUtils;
import com.zhuang.data.orm.enums.PlaceHolderType;
import com.zhuang.data.orm.mapping.TableMapping;

public class OracleSqlBuilder extends BaseSqlBuilder {

    public OracleSqlBuilder(TableMapping tableMapping, PlaceHolderType placeHolderType) {
        super(tableMapping, placeHolderType);
    }

    @Override
    protected String getPlaceHolder(PlaceHolderType placeHolderType, String columnName) {
        String jdbcType = JdbcTypeUtils.getJdbcTypeName(tableMapping.getColumnByColumnName(columnName).getPropertyType());
        if (jdbcType != null) {
            columnName = columnName + ",jdbcType=" + jdbcType;
        }
        String result = super.getPlaceHolder(placeHolderType, columnName);
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy