Beispiel #1
0
 public static string GetPreviewConnectionString(this TOMWrapper.DataSource source)
 {
     if (source.HasAnnotation(PREVIEWCONNSTRING))
     {
         return(source.GetAnnotation(PREVIEWCONNSTRING));
     }
     else
     {
         return(null);
     }
 }
Beispiel #2
0
        public static RowLimitClause GetRowLimitClause(this TOMWrapper.DataSource source)
        {
            var value = source.GetAnnotation(LIMITCLAUSE);

            if (Enum.TryParse(value, out RowLimitClause parsedValue))
            {
                return(parsedValue);
            }

            return(RowLimitClause.Top); // Default
        }
Beispiel #3
0
        public static IdentifierQuoting GetIdentifierQuoting(this TOMWrapper.DataSource source)
        {
            var value = source.GetAnnotation(QUOTING);

            if (Enum.TryParse(value, out IdentifierQuoting parsedValue))
            {
                return(parsedValue);
            }

            return(IdentifierQuoting.SquareBracket); // Default
        }
Beispiel #4
0
 public static void SetRowLimitClause(this TOMWrapper.DataSource source, RowLimitClause rowLimitClause)
 {
     source.SetAnnotation(LIMITCLAUSE, $"{(int)rowLimitClause}");
 }
Beispiel #5
0
 public static void SetIdentifierQuoting(this TOMWrapper.DataSource source, IdentifierQuoting identifierQuoting)
 {
     source.SetAnnotation(QUOTING, $"{(int)identifierQuoting}");
 }