Code

update: function set_last_system deleted at gosaTriggered.pm
[gosa.git] / gosa-si / modules / DBsqlite.pm
index 556b31ef7e96878077fe6793d4c0a0a73973aa3b..a571a7bb62dec4fbd8f408e9f40df6f220058399 100644 (file)
@@ -26,8 +26,8 @@ sub new {
     $self->{dbh} = $dbh;
     $self->{db_name} = $db_name;
     $self->{db_lock} = $lock;
-    bless($self,$class);
 
+    bless($self,$class);
     return($self);
 }
 
@@ -117,7 +117,7 @@ sub add_dbentry {
                my $create_id=0;
                foreach my $col_name (@{$col_names}) {
                        if($col_name eq "id" && (! exists $arg->{$col_name})) {
-                               &main::daemon_log("DEBUG: id field found without value! Creating autoincrement statement!");
+                               #&main::daemon_log("0 DEBUG: id field found without value! Creating autoincrement statement!", 7);
                                $create_id=1;
                        }
                }
@@ -157,7 +157,7 @@ sub add_dbentry {
                        return (4, $sql_statement);
                } 
 
-               # entry already exists -> run update
+       # entry already exists -> run update
        } else  {
                my @update_l;
                while( my ($pram, $val) = each %{$arg} ) {
@@ -290,6 +290,11 @@ sub exec_statement {
                        &main::daemon_log("ERROR: $sql_statement failed with $@", 1);
                }
        }
+       # TODO : maybe an error handling and an erro feedback to invoking function
+       #my $error = @$self->{dbh}->err;
+       #if ($error) {
+       #       my $error_string = @$self->{dbh}->errstr;
+       #}
 
     return \@db_answer;
 }