Esempio n. 1
0
 /// <summary>
 /// Use the value from col if this column is null.
 /// "CASE WHEN " + this.Id(langCode) + " IS NOT NULL THEN " + Id(langCode) +
 /// " ELSE " + col.Id() + " END " +
 /// " AS " + this.Label(langCode)
 /// </summary>
 /// <param name="langCode"></param>
 /// <param name="col"></param>
 /// <returns></returns>
 public string ForSelectWithFallback(string langCode, Column4Parameterized col)
 {
     return("CASE WHEN " + this.Id(langCode) + " IS NOT NULL THEN " +
            this.Id(langCode) +
            " ELSE " + col.Id() + " END " +
            " AS " + this.Label(langCode) + " ");
 }
Esempio n. 2
0
 /// <summary>
 /// Id() + " = " + otherCol.Id()
 /// </summary>
 /// <param name="otherCol">The column this columns must be equal to.</param>
 /// <returns></returns>
 public string Is(Column4Parameterized otherCol)
 {
     return(this.Id() + " = " + otherCol.Id());
 }