public virtual string SerializeFieldNameAndTablePrefix(SQLSelectTable objTable, string strFieldName) { string strTablePrefix = string.Empty; if (objTable != null) strTablePrefix = SerializeTablePrefix(objTable) + "."; return strTablePrefix + SerializeIdentifier(strFieldName); }
public virtual string SerializeSelectTable(SQLSelectTable table) { if (String.IsNullOrEmpty(table.Name)) throw new Exceptions.DatabaseObjectsException("Table has not been set."); string strSQL = string.Empty; if (!String.IsNullOrEmpty(table.DatabaseName)) strSQL += SerializeIdentifier(table.DatabaseName) + "."; if (!String.IsNullOrEmpty(table.SchemaName)) strSQL += SerializeIdentifier(table.SchemaName) + "."; return strSQL + SerializeIdentifier(table.Name); }
/// <summary> /// Returns the table alias or if the alias is not set the table's name. /// </summary> public virtual string SerializeTablePrefix(SQLSelectTable objTable) { if (!String.IsNullOrEmpty(objTable.Alias)) return SerializeIdentifier(objTable.Alias); else return SerializeIdentifier(objTable.Name); }