nde_defines.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #pragma once
  2. /* important defines and enums that are shared between the C++ api and the C api */
  3. #define NDE_CACHE TRUE
  4. #define NDE_NOCACHE FALSE
  5. #define NDE_OPEN_ALWAYS TRUE
  6. #define NDE_OPEN_EXISTING FALSE
  7. #if defined(WIN32_NOLIB) || !defined(WIN32) && !defined(WIN64)
  8. #define NDE_API
  9. #else
  10. #ifdef NDE_EXPORTS
  11. #define NDE_API __declspec(dllexport)
  12. #else
  13. #define NDE_API __declspec(dllimport)
  14. #endif
  15. #endif
  16. // Field types
  17. enum
  18. {
  19. FIELD_COLUMN = 0,
  20. FIELD_INDEX = 1,
  21. FIELD_REDIRECTOR =2,
  22. FIELD_STRING =3,
  23. FIELD_INTEGER = 4,
  24. FIELD_BOOLEAN = 5,
  25. FIELD_BINARY =6, // max size 65536
  26. FIELD_GUID =7,
  27. FIELD_PRIVATE = 8,
  28. FIELD_BITMAP =6,
  29. FIELD_FLOAT = 9,
  30. FIELD_DATETIME =10,
  31. FIELD_LENGTH =11,
  32. FIELD_FILENAME =12,
  33. FIELD_INT64 = 13,
  34. FIELD_BINARY32 =14, // binary field, but 32bit sizes instead of 16bit
  35. FIELD_INT128 = 15, // mainly for storing MD5 hashes
  36. FIELD_UNKNOWN = 255,
  37. FIELD_CLONE = 255,// internal use
  38. };
  39. // Filter types
  40. enum {
  41. FILTER_NONE = 100,
  42. FILTER_EQUALS,
  43. FILTER_NOTEQUALS,
  44. FILTER_CONTAINS,
  45. FILTER_NOTCONTAINS,
  46. FILTER_ABOVE,
  47. FILTER_BELOW,
  48. FILTER_ABOVEOREQUAL,
  49. FILTER_BELOWOREQUAL,
  50. FILTER_BEGINS,
  51. FILTER_ENDS,
  52. FILTER_LIKE,
  53. FILTER_ISEMPTY,
  54. FILTER_ISNOTEMPTY,
  55. FILTER_BEGINSLIKE,
  56. };
  57. // compare modes
  58. #define COMPARE_MODE_CONTAINS 1
  59. #define COMPARE_MODE_EXACT 2
  60. #define COMPARE_MODE_STARTS 3
  61. // scanner 'from' special constant
  62. #define FIRST_RECORD -1