[pgsqlclient-checkins] pgsqlclient_10/PostgreSql.Data.PgSqlClient/source PgCommandBuilder.cs,1.5,1.6
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2003-08-31 12:59:40
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1:/tmp/cvs-serv3553 Modified Files: PgCommandBuilder.cs Log Message: Improved command builder implementation Index: PgCommandBuilder.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommandBuilder.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PgCommandBuilder.cs 22 Aug 2003 19:39:58 -0000 1.5 --- PgCommandBuilder.cs 31 Aug 2003 12:59:36 -0000 1.6 *************** *** 239,243 **** } - buildSchemaTable(); buildInsertCommand(null, null); } --- 239,242 ---- *************** *** 271,275 **** } - buildSchemaTable(); buildUpdateCommand(null, null); } --- 270,273 ---- *************** *** 303,307 **** } - buildSchemaTable(); buildDeleteCommand(null, null); } --- 301,304 ---- *************** *** 341,344 **** --- 338,343 ---- string dsColumnName = String.Empty; + buildSchemaTable(); + insertCommand = new PgCommand(sql.ToString(), selectCommand.Connection, selectCommand.Transaction); *************** *** 409,412 **** --- 408,413 ---- string dsColumnName = String.Empty; + buildSchemaTable(); + if (!hasPrimaryKey && !hasUniqueKey) { *************** *** 519,522 **** --- 520,525 ---- string dsColumnName = String.Empty; + buildSchemaTable(); + if (!hasPrimaryKey && !hasUniqueKey) { *************** *** 752,771 **** try { - buildSchemaTable(); - switch (e.StatementType) { case StatementType.Insert: ! e.Command = buildInsertCommand(e.Row, e.TableMapping); e.Status = UpdateStatus.Continue; break; case StatementType.Update: ! e.Command = buildUpdateCommand(e.Row, e.TableMapping); e.Status = UpdateStatus.Continue; break; case StatementType.Delete: ! e.Command = buildDeleteCommand(e.Row, e.TableMapping); e.Status = UpdateStatus.Continue; break; --- 755,781 ---- try { switch (e.StatementType) { case StatementType.Insert: ! if (e.Command == null) ! { ! e.Command = buildInsertCommand(e.Row, e.TableMapping); ! } e.Status = UpdateStatus.Continue; break; case StatementType.Update: ! if (e.Command == null) ! { ! e.Command = buildUpdateCommand(e.Row, e.TableMapping); ! } e.Status = UpdateStatus.Continue; break; case StatementType.Delete: ! if (e.Command == null) ! { ! e.Command = buildDeleteCommand(e.Row, e.TableMapping); ! } e.Status = UpdateStatus.Continue; break; |