Exemplo n.º 1
0
        internal IndexedColumn(SqlIdentifier identifier)
        {
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            Name       = identifier.Value.LocalName;
            Expression = Array.Empty <Token <SqliteToken> >();
        }
Exemplo n.º 2
0
        internal TableConstraint WithName(SqlIdentifier constraintName)
        {
            if (constraintName == null)
            {
                throw new ArgumentNullException(nameof(constraintName));
            }

            Name = Option <string> .Some(constraintName.Value.LocalName);

            return(this);
        }
Exemplo n.º 3
0
        public ColumnConstraint WithName(SqlIdentifier identifier)
        {
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            Name = Option <string> .Some(identifier.Value.LocalName);

            return(this);
        }
Exemplo n.º 4
0
            public ForeignKey(SqlIdentifier parentTableName, IReadOnlyCollection <SqlIdentifier> parentColumnNames)
                : base(ColumnConstraintType.ForeignKey)
            {
                if (parentTableName == null)
                {
                    throw new ArgumentNullException(nameof(parentTableName));
                }
                if (parentColumnNames == null || parentColumnNames.Empty())
                {
                    throw new ArgumentNullException(nameof(parentColumnNames));
                }

                ParentTable       = parentTableName.Value;
                ParentColumnNames = parentColumnNames.Select(c => c.Value.LocalName).ToList();
            }
Exemplo n.º 5
0
 public ColumnDefinition(SqlIdentifier columnName, IEnumerable <Token <SqliteToken> > typeDefinition)
     : this(columnName.Value.LocalName, typeDefinition, Array.Empty <ColumnConstraint>())
 {
 }
Exemplo n.º 6
0
 public ColumnDefinition(SqlIdentifier columnName)
     : this(columnName.Value.LocalName, Array.Empty <Token <SqliteToken> >(), Array.Empty <ColumnConstraint>())
 {
 }