Example #1
0
            // Without delete
            public SQLInsert(string table, List<SQLInsertRow> rows, bool ignore = false)
            {
                Table = table;
                Rows = rows;
                Delete = null;

                TableStructure = new List<string>();
                var firstProperRow = Rows.Find(row => String.IsNullOrWhiteSpace(row.HeaderComment));
                if (firstProperRow != null)
                    TableStructure = firstProperRow.FieldNames;

                InsertHeader = new SQLInsertHeader(Table, TableStructure, ignore);
            }
Example #2
0
            // Double primary key
            public SQLInsert(string table, ICollection<Tuple<uint, uint>> values, ICollection<string> primaryKeys,
                             List<SQLInsertRow> rows)
            {
                Table = table;
                Rows = rows;

                TableStructure = new List<string>();
                var firstProperRow = Rows.Find(row => String.IsNullOrWhiteSpace(row.HeaderComment));
                if (firstProperRow != null)
                    TableStructure = firstProperRow.FieldNames;

                Delete = new SQLDelete(values, primaryKeys, Table);
                InsertHeader = new SQLInsertHeader(Table, TableStructure);
            }