Example #1
0
        private void AddRowFromTableConstructor(Table table, List <Column> columns, SqlTableConstructorInsertSource source)
        {
            var row       = InitializeNewRow(table, columns);
            var valueList = source.TableConstructorExpression.Rows[0].Children.ToList(  );

            if (columns.Count > valueList.Count)
            {
                throw new SqlInsertTooManyColumnsException(  );
            }
            if (columns.Count < valueList.Count)
            {
                throw new SqlInsertTooManyValuesException(  );
            }

            for (int index = 0; index < columns.Count; index++)
            {
                AddRowValue(row, columns[index], valueList[index]);
            }
            AddRowToTable(table, row);
        }
Example #2
0
 public override void Visit(SqlTableConstructorInsertSource codeObject)
 {
 }