raw.js 812 B

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