PageRenderTime 45ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/common.h

https://github.com/xiaogongzhu/luamongo
C Header | 30 lines | 25 code | 4 blank | 1 comment | 0 complexity | 8b4ce9dafafaf047f4801f593b9d0d95 MD5 | raw file
  1. #define LUAMONGO_ROOT "mongo"
  2. #define LUAMONGO_CONNECTION "mongo.Connection"
  3. #define LUAMONGO_REPLICASET "mongo.ReplicaSet"
  4. #define LUAMONGO_CURSOR "mongo.Cursor"
  5. #define LUAMONGO_QUERY "mongo.Query"
  6. #define LUAMONGO_GRIDFS "mongo.GridFS"
  7. #define LUAMONGO_GRIDFILE "mongo.GridFile"
  8. #define LUAMONGO_GRIDFSCHUNK "mongo.GridFSChunk"
  9. // not an actual class, pseudo-base for error messages
  10. #define LUAMONGO_DBCLIENT "mongo.DBClient"
  11. #define LUAMONGO_ERR_CONNECTION_FAILED "Connection failed: %s"
  12. #define LUAMONGO_ERR_REPLICASET_FAILED "ReplicaSet.New failed: %s"
  13. #define LUAMONGO_ERR_GRIDFS_FAILED "GridFS failed: %s"
  14. #define LUAMONGO_ERR_GRIDFSCHUNK_FAILED "GridFSChunk failed: %s"
  15. #define LUAMONGO_ERR_QUERY_FAILED "Query failed: %s"
  16. #define LUAMONGO_ERR_INSERT_FAILED "Insert failed: %s"
  17. #define LUAMONGO_ERR_CONNECT_FAILED "Connection to %s failed: %s"
  18. #define LUAMONGO_ERR_COUNT_FAILED "Count failed: %s"
  19. #define LUAMONGO_ERR_REMOVE_FAILED "Remove failed: %s"
  20. #define LUAMONGO_ERR_UPDATE_FAILED "Update failed: %s"
  21. #define LUAMONGO_UNSUPPORTED_BSON_TYPE "Unsupported BSON type `%s'"
  22. #define LUAMONGO_UNSUPPORTED_LUA_TYPE "Unsupported Lua type `%s'"
  23. #define LUAMONGO_REQUIRES_JSON_OR_TABLE "JSON string or Lua table required"
  24. #define LUAMONGO_REQUIRES_QUERY LUAMONGO_QUERY ", JSON string or Lua table required"
  25. #define LUAMONGO_NOT_IMPLEMENTED "Not implemented: %s.%s"
  26. #define LUAMONGO_ERR_CALLING "Error calling %s.%s: %s"