@opengis/fastify-table
Version:
core-plugins
35 lines • 1.53 kB
TypeScript
import type { FastifyReply } from "fastify";
import type { ExtendedPG } from "../../../types/core.js";
/**
* Експорт даних з таблиці
*
* @method GET
* @alias exportTable
* @type api
* @tag export
* @summary Експорт даних у таблицю(xlsx, csv, json, geojson)
* @priority 1
* @example
* /api/export?table=com_property.subjects.table&format=csv&cols=economy_type,name_ua
* @param {String} format Формат документу на виході
* @param {Boolean} nocache Чи використовувати кеш
* @param {String} table Таблиця в БД
* @param {String|Number} filter Параметр фільтру для застосування до експортованих даних
* @errors 400, 500
* @returns {Number} status Номер помилки
* @returns {String} error Опис помилки
* @returns {String|Object} message Повертає SQL запит або opt або рядки SQL запиту
* @returns {String} file Шлях до файла для скачування або відображення
*/
export default function exportTable({ pg, headers, user, columns: columns1, cls, query, host, tableSql, sourceName, }: {
pg: ExtendedPG;
headers?: Record<string, any>;
user?: Record<string, any>;
columns?: string;
cls?: any;
query?: Record<string, any>;
host?: string;
tableSql?: string;
sourceName?: string;
}, reply: FastifyReply): Promise<any>;
//# sourceMappingURL=export.d.ts.map