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

io.odysz.transact.sql.parts.Alias Maven / Gradle / Ivy

package io.odysz.transact.sql.parts;

import io.odysz.common.dbtype;
import io.odysz.semantics.ISemantext;

public class Alias extends AbsPart {

	String a;
	
	public Alias(String as) {
		a = as;
	}

	@Override
	public String sql(ISemantext ctx) {
		if (ctx != null && ctx.dbtype() == dbtype.oracle)
			return "\"" + a + "\"";
		return a == null ? "" : a;
	}

	public String toUpperCase() {
		return a == null ? "" : a.toUpperCase();
	}

	public String toString() {
		return a;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy