literal date is also possible
Inheritance: Literal
Exemple #1
0
 public IndexOption(LiteralString comment)
 {
     KeyBlockSize = null;
     IndexType = IndexType.Btree;
     ParserName = null;
     Comment = comment;
 }
        /// <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();
                }
            }
        }
 /// <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;
 }
 public virtual void Visit(LiteralString node)
 {
 }