diff --git a/lazarus/DBConnection.pas b/lazarus/DBConnection.pas index acc9928..9197ebf 100644 --- a/lazarus/DBConnection.pas +++ b/lazarus/DBConnection.pas @@ -58,7 +58,7 @@ TDBConnection = class // updateInserts student object into database. Either updates an existing one or inserts a new one // parameter: student object // result: TRUE on success - function updateInsertStudent(student: TStudent): boolean; + function updateInsertStudent(var student: TStudent): boolean; // Deletes a student and destroys the object // parameter: student object @@ -77,13 +77,13 @@ TDBConnection = class // Returns an array of all rentals with given student and book // parameter: student, book // result: array of rental objects - function getAllRentalsByBookAndStudent(student: TStudent; - book: TBook): ArrayOfRentals; + function getAllRentalsByBookAndStudent(var student: TStudent; + var book: TBook): ArrayOfRentals; // updateInserts rental object into database. Either updates an existing one or inserts a new one // parameter: rental object // result: TRUE on success - function updateInsertRental(rental: TRental): boolean; + function updateInsertRental(var rental: TRental): boolean; // Deletes a rental and destroys the object // parameter: rental object @@ -111,7 +111,7 @@ TDBConnection = class // updateInserts book object into database. Either updates an existing one or inserts a new one // parameter: book object // result: TRUE on success - function updateInsertBook(book: TBook): boolean; + function updateInsertBook(var book: TBook): boolean; // Deletes a book and destroys the object // parameter: book object @@ -126,16 +126,16 @@ TDBConnection = class // result: array of booktype objects function getBooktypes: ArrayOfBooktypes; - // updateInserts booktype object into database. Either updates an existing one or inserts a new one - // parameter: booktype object - // result: TRUE on success - function updateInsertBooktype(booktype: TBooktype): boolean; - // Returns the Booktype of an ISBN Number // parameter: Isbn (String type) // result: TBooktype on success, NIL on failure function getBooktypeByIsbn(isbn: string): TBooktype; + // updateInserts booktype object into database. Either updates an existing one or inserts a new one + // parameter: booktype object + // result: TRUE on success + function updateInsertBooktype(var booktype: TBooktype): boolean; + // Deletes a booktype and destroys the object // parameter: booktype object // result: TRUE on success @@ -399,7 +399,7 @@ function TDBConnection.getStudentByLDAPUser(ldap_user: string): TStudent; Result := arr[0]; end; -function TDBConnection.updateInsertStudent(student: TStudent): boolean; +function TDBConnection.updateInsertStudent(var student: TStudent): boolean; begin DBError := nil; SQLQuery.Close; @@ -536,8 +536,8 @@ function TDBConnection.getRentals: ArrayOfRentals; setRentalFields(Result, False); end; -function TDBConnection.getAllRentalsByBookAndStudent(student: TStudent; - book: TBook): ArrayOfRentals; +function TDBConnection.getAllRentalsByBookAndStudent(var student: TStudent; + var book: TBook): ArrayOfRentals; begin DBError := nil; SQLQuery.Close; @@ -565,7 +565,7 @@ function TDBConnection.getAllRentalsByBookAndStudent(student: TStudent; setRentalFields(Result, False); end; -function TDBConnection.updateInsertRental(rental: TRental): boolean; +function TDBConnection.updateInsertRental(var rental: TRental): boolean; begin DBError := nil; SQLQuery.Close; @@ -760,7 +760,7 @@ function TDBConnection.getBookById(id: longint): TBook; Result := arr[0]; end; -function TDBConnection.updateInsertBook(book: TBook): boolean; +function TDBConnection.updateInsertBook(var book: TBook): boolean; begin DBError := nil; SQLQuery.Close; @@ -887,7 +887,7 @@ function TDBConnection.getBooktypes: ArrayOfBooktypes; setBooktypeFields(Result, False); end; -function TDBConnection.updateInsertBooktype(booktype: TBooktype): boolean; +function TDBConnection.updateInsertBooktype(var booktype: TBooktype): boolean; begin DBError := nil; SQLQuery.Close;