We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
package io.tapdata.common; import io.tapdata.entity.schema.TapField; import io.tapdata.entity.utils.DataMap; /** * attributes for common columns * * @author Jarad * @date 2022/4/20 */ public class CommonColumn { protected String columnName; protected String dataType; protected String nullable; protected String remarks; protected String columnDefaultValue; protected String autoInc; protected String pureDataType; protected Integer dataLength; protected Integer dataPrecision; protected Integer dataScale; public CommonColumn() { } public CommonColumn(DataMap dataMap) { this.columnName = dataMap.getString("columnName"); this.dataType = dataMap.getString("dataType"); this.pureDataType = dataMap.getString("dataType"); this.dataLength = dataMap.getInteger("dataLength"); this.dataPrecision = dataMap.getInteger("dataPrecision"); this.dataScale = dataMap.getInteger("dataScale"); this.nullable = dataMap.getString("nullable"); this.remarks = dataMap.getString("columnComment"); this.columnDefaultValue = null; } protected Boolean isNullable() { return "1".equals(this.nullable); } protected Boolean isAutoInc() { return "1".equals(this.autoInc); } public TapField getTapField() { return new TapField(this.columnName, this.dataType).nullable(this.isNullable()). defaultValue(columnDefaultValue).comment(this.remarks); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: