Beispiel #1
0
        internal static TableType TryDetectTableType(Designer root, string tableName, string method = null)
        {
            root.CheckNullAndThrow(Chainer.Arg(() => tableName, tableName), method);
            var identifier = Common.CheckIdentifier(tableName);

            if (identifier == IdentifierValidity.Variable)
            {
                return(TableType.Variable);
            }
            else if (identifier == IdentifierValidity.TempTable)
            {
                root.TryAddTempTable(tableName);
                return(TableType.TempTable);
            }
            else
            {
                root.Throw(QueryTalkExceptionType.InvalidTableIdentifier,
                           String.Format("identifier = {0}", tableName), method);
            }

            return(TableType.None);
        }