
/* DO NOT EDIT THIS FILE -- it is autogenerated -- edit table.m4 instead */





/* ------------------------------------------------------ */
/* This routine stores/updates one record in the database.
 * It does not do any traversals, it does not lock.  
 * It just pokes the data in.
 */
void 
pgendStoreOneCheckpointOnly (PGBackend *be,
                                    Checkpoint *ptr,
                                    sqlBuild_QType update)
{
   const char *buf;
   ENTER ("be=%p, Checkpoint=%p", be, ptr);
   if (!be || !ptr) return;

   /* build the sql query */
   sqlBuild_Table (be->builder, "gncCheckpoint", update);
      sqlBuild_Set_Int64 (be->builder, "balance", ptr->balance);
   sqlBuild_Set_Int64 (be->builder, "cleared_balance", ptr->cleared_balance);
   sqlBuild_Set_Int64 (be->builder, "reconciled_balance", ptr->reconciled_balance);
   sqlBuild_Set_Date (be->builder, "date_start", ptr->date_start);
   sqlBuild_Set_Date (be->builder, "date_end", ptr->date_end);
   sqlBuild_Set_Str (be->builder, "commodity", ptr->commodity);
   sqlBuild_Set_GUID (be->builder, "accountGuid", ptr->account_guid);


   buf = sqlBuild_Query (be->builder);
   SEND_QUERY (be,buf, );

   /* flush the buffers, check the status */
   FINISH_QUERY(be->connection);
   LEAVE (" ");
}


