readme.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. SQLDB readme file, 20 Aug 2005, Joost van der Sluis
  2. since there is no real documentation about sqldb yet, this should be regarded as
  3. a small reminder to myself, and to others who want to write their own
  4. connections.
  5. From the TSQLConnection point-of-view the following methods are called if a
  6. select-statement is used:
  7. OPEN:
  8. Prepare: (is only called when prepared is false)
  9. - AllocateCursorHandle (only if the cursor <> nil)
  10. - Preparestatement
  11. Execute:
  12. - Execute
  13. - AddFieldDefs (only if called for the first time after a prepare)
  14. GETNEXTPAKCET: (probably called several times, offcourse)
  15. - Fetch
  16. - Loadfield
  17. CLOSE:
  18. - FreeFieldBuffers
  19. - UnPrepareStatement (Only if prepare is False, thus if prepared queries
  20. were not supported)
  21. UnPrepare:
  22. - UnPrepareStatement
  23. DESTROY:
  24. - DeAllocateCursorHandle (Also called if the Connection is changed)
  25. From the TSQLConnection point-of-view the following methods are called if a non-
  26. select-statement is used (execsql):
  27. Prepare: (is only called when prepared is false)
  28. - AllocateCursorHandle (only if the cursor <> nil)
  29. - Preparestatement
  30. Execute:
  31. - Execute
  32. - UnPrepareStatement (Only if prepare is False, thus if prepared queries
  33. were not supported)
  34. UNPREPARE:
  35. - UnPrepareStatement
  36. DESTROY:
  37. - DeAllocateCursorHandle (Also called if the Connection is changed)
  38. A short description of what each method in a TSQLConnection should do:
  39. * Function AllocateCursorHandle : TSQLCursor; override;
  40. This function creates and returns a TSQLcursor which can be used by any query
  41. for the used type of database. The cursor is only database-dependent, it is
  42. deallocated when the connection of the query changes, or if the query is
  43. destroyed.
  44. * Procedure DeAllocateCursorHandle(var cursor : TSQLCursor); override;
  45. This function deallocates the TSQLCursor, and sets its value to nil.
  46. * procedure PrepareStatement(cursor: TSQLCursor;ATransaction : TSQLTransaction;buf : string; AParams : TParams); override;
  47. This functions prepares the query which is given in buf.
  48. It's only called if Prepared is True.
  49. If the database supports prepared queries for the kind of sql-statement (in
  50. cursor.FStatementType) and the prepare was successfully, then cursor.FPrepared
  51. is set to True, so that prepare will not be called again, until UnPrepared
  52. is called. (which sets FPrepared to False)
  53. * procedure FreeFldBuffers(cursor : TSQLCursor); override;
  54. This procedure is called if a Select-query is closed. This procedure is used to
  55. handle all actions which are needed to close a select-statement.