home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / OOFILE / docs / fields.txt < prev    next >
Encoding:
Text File  |  1995-06-05  |  1.7 KB  |  79 lines  |  [TEXT/ttxt]

  1. fields.txt
  2.  
  3. ----------
  4. dbDate
  5. ----------
  6. Stores a calendar date, without times.
  7. Unlike dates based on counting seconds, can represent any date.
  8.  
  9. IN:
  10. - char* by assignment and setString
  11. - long by assignment (internal representation is a long)
  12. - set of 3 longs by setDate(Year, Month, Day)
  13. - current date by setDateToday()
  14.  
  15. OUT:
  16. - char*
  17. - long
  18. - set of 3 longs
  19.  
  20.  
  21. NOTES:
  22. Conversion of character strings to dates has a default order of DMY. You can change this to orderYMD, or orderMDY with a single line at the start of your program:
  23.     dbDate::sDefaultDateOrder=dbDate::orderMDY;
  24.  
  25.  
  26. UTILITIES:
  27. Static conversion utilities to let you use the same long representation. (Yes, I know this is a bit grotty but it was on request.) You can also apply the same parsing to string or stream to get the numbers back (subject to the default parsing order above).
  28.  
  29. ymd2Long
  30. long2ymd
  31.  
  32. chars2ymd
  33. chars2Long
  34. istream2ymd
  35. ymd2stream
  36.  
  37. today2ymd    // returns the system date
  38. today  // stream manipulator, use as below (NOT with function call parens)
  39.     cout << dbDate::today << endl
  40.  
  41.  
  42.  
  43. ----------
  44. Numeric Types
  45. ----------
  46. These all behave the same as their c++ native equivalents, with simple assignment to and from.
  47. dbLong
  48. dbUlong
  49. dbShort
  50. dbUshort
  51. dbReal  ( equivalent to standard 8-byte double)
  52.  
  53.  
  54.  
  55. ----------
  56. dbChar
  57. ----------
  58. Fixed length string type.
  59.  
  60.  
  61.  
  62. ----------
  63. dbText
  64. ----------
  65. Variable length string type. Based on dbBLOB. Can't be indexed other than by method (eg: keyword indexing).
  66.  
  67.  
  68.  
  69. ----------
  70. dbBLOB
  71. ----------
  72. Base type for general Blobs that are "lazily loaded" as required.
  73.  
  74.  
  75.  
  76. ----------
  77. dbFixedBinary
  78. ----------
  79. Data type for basing your own special types on. Internally maps to a character array so the current cross-platform implementation won't flip bytes.