text.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2015-present, Vitaly Tomilov
  3. *
  4. * See the LICENSE file at the top-level directory of this distribution
  5. * for licensing information.
  6. *
  7. * Removal or modification of this copyright notice is prohibited.
  8. */
  9. /* All error messages used in the module */
  10. const streamVersion = require('../package.json')
  11. .devDependencies['pg-query-stream'];
  12. module.exports = {
  13. nativeError: 'Failed to initialize Native Bindings.',
  14. /* Database errors */
  15. queryDisconnected: 'Cannot execute a query on a disconnected client.',
  16. invalidQuery: 'Invalid query format.',
  17. invalidFunction: 'Invalid function name.',
  18. invalidProc: 'Invalid procedure name.',
  19. invalidMask: 'Invalid Query Result Mask specified.',
  20. looseQuery: 'Querying against a released or lost connection.',
  21. /* result errors */
  22. notEmpty: 'No return data was expected.',
  23. noData: 'No data returned from the query.',
  24. multiple: 'Multiple rows were not expected.',
  25. /* streaming support */
  26. nativeStreaming: 'Streaming doesn\'t work with Native Bindings.',
  27. invalidStream: `Invalid or missing stream object: pg-query-stream >= v${streamVersion} was expected`,
  28. invalidStreamState: 'Invalid stream state.',
  29. invalidStreamCB: 'Invalid or missing stream initialization callback.',
  30. /* connection errors */
  31. poolDestroyed: 'Connection pool of the database object has been destroyed.',
  32. clientEnd: 'Abnormal client.end() call, due to invalid code or failed server connection.'
  33. };