perspectives: render simple table

This commit is contained in:
Jan Prochazka
2022-06-23 16:04:05 +02:00
parent 4672540f82
commit aca92f3889
5 changed files with 75 additions and 7 deletions

View File

@@ -63,13 +63,20 @@
// : null;
async function loader(props: PerspectiveDataLoadProps) {
const { schemaName, pureName, bindingColumns, bindingValues } = props;
const { schemaName, pureName, bindingColumns, bindingValues, dataColumns } = props;
const select: Select = {
commandType: 'select',
from: {
name: { schemaName, pureName },
},
selectAll: true,
columns: dataColumns?.map(columnName => ({
exprType: 'column',
columnName,
source: {
name: { schemaName, pureName },
},
})),
selectAll: !dataColumns,
};
if (bindingColumns?.length == 1) {
select.where = {