constants.rb 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. module SQLite3 ; module Constants
  2. module TextRep
  3. UTF8 = 1
  4. UTF16LE = 2
  5. UTF16BE = 3
  6. UTF16 = 4
  7. ANY = 5
  8. end
  9. module ColumnType
  10. INTEGER = 1
  11. FLOAT = 2
  12. TEXT = 3
  13. BLOB = 4
  14. NULL = 5
  15. end
  16. module ErrorCode
  17. OK = 0 # Successful result
  18. ERROR = 1 # SQL error or missing database
  19. INTERNAL = 2 # An internal logic error in SQLite
  20. PERM = 3 # Access permission denied
  21. ABORT = 4 # Callback routine requested an abort
  22. BUSY = 5 # The database file is locked
  23. LOCKED = 6 # A table in the database is locked
  24. NOMEM = 7 # A malloc() failed
  25. READONLY = 8 # Attempt to write a readonly database
  26. INTERRUPT = 9 # Operation terminated by sqlite_interrupt()
  27. IOERR = 10 # Some kind of disk I/O error occurred
  28. CORRUPT = 11 # The database disk image is malformed
  29. NOTFOUND = 12 # (Internal Only) Table or record not found
  30. FULL = 13 # Insertion failed because database is full
  31. CANTOPEN = 14 # Unable to open the database file
  32. PROTOCOL = 15 # Database lock protocol error
  33. EMPTY = 16 # (Internal Only) Database table is empty
  34. SCHEMA = 17 # The database schema changed
  35. TOOBIG = 18 # Too much data for one row of a table
  36. CONSTRAINT = 19 # Abort due to contraint violation
  37. MISMATCH = 20 # Data type mismatch
  38. MISUSE = 21 # Library used incorrectly
  39. NOLFS = 22 # Uses OS features not supported on host
  40. AUTH = 23 # Authorization denied
  41. ROW = 100 # sqlite_step() has another row ready
  42. DONE = 101 # sqlite_step() has finished executing
  43. end
  44. end ; end