raw.js 712 B

123456789101112131415161718192021222324252627282930313233
  1. import { entityKind } from "../../entity.js";
  2. import { QueryPromise } from "../../query-promise.js";
  3. class PgRaw extends QueryPromise {
  4. constructor(execute, sql, query, mapBatchResult) {
  5. super();
  6. this.execute = execute;
  7. this.sql = sql;
  8. this.query = query;
  9. this.mapBatchResult = mapBatchResult;
  10. }
  11. static [entityKind] = "PgRaw";
  12. /** @internal */
  13. getSQL() {
  14. return this.sql;
  15. }
  16. getQuery() {
  17. return this.query;
  18. }
  19. mapResult(result, isFromBatch) {
  20. return isFromBatch ? this.mapBatchResult(result) : result;
  21. }
  22. _prepare() {
  23. return this;
  24. }
  25. /** @internal */
  26. isResponseInArrayMode() {
  27. return false;
  28. }
  29. }
  30. export {
  31. PgRaw
  32. };
  33. //# sourceMappingURL=raw.js.map