literal date is also possible
Inheritance: Literal
コード例 #1
0
ファイル: IndexOption.cs プロジェクト: tupunco/Tup.Cobar4Net
 public IndexOption(LiteralString comment)
 {
     KeyBlockSize = null;
     IndexType = IndexType.Btree;
     ParserName = null;
     Comment = comment;
 }
コード例 #2
0
        /// <returns>upper-case, empty is possible</returns>
        public virtual string GetAliasUnescapeUppercase()
        {
            if (alias == null || alias.Length <= 0)
            {
                return alias;
            }
            if (aliasUpEscape != null)
            {
                return aliasUpEscape;
            }
            switch (alias[0])
            {
                case '`':
                {
                    return aliasUpEscape = Identifier.UnescapeName(alias, true);
                }

                case '\'':
                {
                    return
                        aliasUpEscape =
                            LiteralString.GetUnescapedString(Runtime.Substring(alias, 1, alias.Length - 1), true);
                }

                case '_':
                {
                    var ind = -1;
                    for (var i = 1; i < alias.Length; ++i)
                    {
                        if (alias[i] == '\'')
                        {
                            ind = i;
                            break;
                        }
                    }
                    if (ind >= 0)
                    {
                        var st = new LiteralString(Runtime.Substring(alias, 0, ind),
                            Runtime.Substring(alias, ind + 1, alias.Length - 1), false);
                        return aliasUpEscape = st.GetUnescapedString(true);
                    }
                    goto default;
                }

                default:
                {
                    return aliasUpEscape = alias.ToUpper();
                }
            }
        }
コード例 #3
0
 /// <param name="dataType" />
 /// <param name="notNull" />
 /// <param name="defaultVal">might be null</param>
 /// <param name="autoIncrement" />
 /// <param name="specialIndex">might be null</param>
 /// <param name="comment">might be null</param>
 /// <param name="columnFormat">might be null</param>
 public ColumnDefinition(DataType dataType,
                         bool notNull,
                         IExpression defaultVal,
                         bool autoIncrement,
                         SpecialIndex specialIndex,
                         LiteralString comment,
                         ColumnFormat columnFormat)
 {
     if (dataType == null)
     {
         throw new ArgumentException("data type is null");
     }
     DataType = dataType;
     IsNotNull = notNull;
     DefaultVal = defaultVal;
     IsAutoIncrement = autoIncrement;
     SpecialIndex = specialIndex;
     Comment = comment;
     ColumnFormat = columnFormat;
 }
コード例 #4
0
 public virtual void Visit(LiteralString node)
 {
 }