@opengis/fastify-table 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +42 -42
- package/Changelog.md +20 -20
- package/README.md +26 -26
- package/config.js +3 -3
- package/crud/controllers/deleteCrud.js +10 -10
- package/crud/controllers/insert.js +9 -9
- package/crud/controllers/update.js +10 -10
- package/crud/funcs/dataDelete.js +15 -0
- package/crud/funcs/dataInsert.js +24 -24
- package/crud/funcs/dataUpdate.js +20 -20
- package/crud/funcs/isFileExists.js +13 -13
- package/crud/index.js +29 -29
- package/helper.js +28 -28
- package/index.js +22 -22
- package/package.json +22 -22
- package/pg/funcs/autoIndex.js +89 -89
- package/pg/funcs/getMeta.js +27 -27
- package/pg/funcs/init.js +42 -42
- package/pg/funcs/pgClients.js +2 -2
- package/pg/index.js +35 -35
- package/pg/pgClients.js +17 -17
- package/redis/client.js +8 -8
- package/redis/funcs/redisClients.js +2 -2
- package/redis/index.js +19 -18
- package/server.js +14 -0
- package/table/controllers/data.js +51 -48
- package/table/controllers/filter.js +17 -17
- package/table/controllers/form.js +10 -10
- package/table/controllers/suggest.js +59 -56
- package/table/controllers/utils/getSelect.js +20 -20
- package/table/controllers/utils/getSelectMeta.js +66 -65
- package/table/controllers/utils/getTemplate.js +24 -24
- package/table/funcs/getFilterSQL/index.js +75 -75
- package/table/funcs/getFilterSQL/util/formatValue.js +142 -142
- package/table/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
- package/table/funcs/getFilterSQL/util/getFilterQuery.js +73 -73
- package/table/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
- package/table/funcs/getFilterSQL/util/getTableSql.js +34 -34
- package/table/index.js +14 -14
- package/test/api/crud.test.js +23 -23
- package/test/api/table.test.js +29 -29
- package/test/config.example +18 -18
- package/test/funcs/crud.test.js +37 -37
- package/test/funcs/pg.test.js +26 -26
- package/test/funcs/redis.test.js +19 -19
- package/test/funcs/table.test.js +19 -19
- package/test/templates/cls/test.json +9 -9
- package/test/templates/form/cp_building.form.json +32 -32
- package/test/templates/select/account_id.json +4 -0
- package/test/templates/select/account_id.sql +1 -0
- package/test/templates/select/storage.data.json +2 -2
- package/test/templates/table/gis.dataset.table.json +20 -42
- package/test/templates/table/service.json +18 -0
package/test/api/table.test.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
|
-
|
|
4
|
-
import build from '../../helper.js';
|
|
5
|
-
|
|
6
|
-
test('api table', async (t) => {
|
|
7
|
-
const app = await build(t);
|
|
8
|
-
// assert.ok(1);
|
|
9
|
-
await t.test('GET /suggest', async () => {
|
|
10
|
-
const res = await app.inject({
|
|
11
|
-
method: 'GET',
|
|
12
|
-
url: '/api/suggest/storage.data',
|
|
13
|
-
});
|
|
14
|
-
// console.log(res?.body);
|
|
15
|
-
const rep = JSON.parse(res?.body);
|
|
16
|
-
// console.log(rep.total);
|
|
17
|
-
assert.ok(rep.total);
|
|
18
|
-
});
|
|
19
|
-
await t.test('GET /data', async () => {
|
|
20
|
-
const res = await app.inject({
|
|
21
|
-
method: 'GET',
|
|
22
|
-
url: '/api/data/gis.dataset.table',
|
|
23
|
-
});
|
|
24
|
-
// console.log(res);
|
|
25
|
-
const rep = JSON.parse(res?.body);
|
|
26
|
-
// console.log(rep.total);
|
|
27
|
-
assert.ok(rep.total);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert';
|
|
3
|
+
|
|
4
|
+
import build from '../../helper.js';
|
|
5
|
+
|
|
6
|
+
test('api table', async (t) => {
|
|
7
|
+
const app = await build(t);
|
|
8
|
+
// assert.ok(1);
|
|
9
|
+
await t.test('GET /suggest', async () => {
|
|
10
|
+
const res = await app.inject({
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: '/api/suggest/storage.data',
|
|
13
|
+
});
|
|
14
|
+
// console.log(res?.body);
|
|
15
|
+
const rep = JSON.parse(res?.body);
|
|
16
|
+
// console.log(rep.total);
|
|
17
|
+
assert.ok(rep.total);
|
|
18
|
+
});
|
|
19
|
+
await t.test('GET /data', async () => {
|
|
20
|
+
const res = await app.inject({
|
|
21
|
+
method: 'GET',
|
|
22
|
+
url: '/api/data/gis.dataset.table',
|
|
23
|
+
});
|
|
24
|
+
// console.log(res);
|
|
25
|
+
const rep = JSON.parse(res?.body);
|
|
26
|
+
// console.log(rep.total);
|
|
27
|
+
assert.ok(rep.total);
|
|
28
|
+
});
|
|
29
|
+
});
|
package/test/config.example
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import config from '../config.js';
|
|
2
|
-
|
|
3
|
-
Object.assign(config, {
|
|
4
|
-
templateDir: 'test/templates',
|
|
5
|
-
pg: {
|
|
6
|
-
host: '192.168.3.160',
|
|
7
|
-
port: 5434,
|
|
8
|
-
database: 'mbk_rivne_dma',
|
|
9
|
-
user: 'postgres',
|
|
10
|
-
password: 'postgres',
|
|
11
|
-
},
|
|
12
|
-
redis: {
|
|
13
|
-
host: '192.168.3.160',
|
|
14
|
-
port: 6379,
|
|
15
|
-
family: 4,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
export default config;
|
|
1
|
+
import config from '../config.js';
|
|
2
|
+
|
|
3
|
+
Object.assign(config, {
|
|
4
|
+
templateDir: 'test/templates',
|
|
5
|
+
pg: {
|
|
6
|
+
host: '192.168.3.160',
|
|
7
|
+
port: 5434,
|
|
8
|
+
database: 'mbk_rivne_dma',
|
|
9
|
+
user: 'postgres',
|
|
10
|
+
password: 'postgres',
|
|
11
|
+
},
|
|
12
|
+
redis: {
|
|
13
|
+
host: '192.168.3.160',
|
|
14
|
+
port: 6379,
|
|
15
|
+
family: 4,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export default config;
|
package/test/funcs/crud.test.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
|
-
import '../config.js';
|
|
4
|
-
|
|
5
|
-
import pgClients from '../../pg/pgClients.js';
|
|
6
|
-
import rclient from '../../redis/client.js';
|
|
7
|
-
|
|
8
|
-
import dataInsert from '../../crud/funcs/dataInsert.js';
|
|
9
|
-
import dataUpdate from '../../crud/funcs/dataUpdate.js';
|
|
10
|
-
|
|
11
|
-
import getOpt from '../../crud/funcs/getOpt.js';
|
|
12
|
-
import setOpt from '../../crud/funcs/setOpt.js';
|
|
13
|
-
|
|
14
|
-
test('fucns crud', async (t) => {
|
|
15
|
-
await t.test('getOpt/setOpt', async () => {
|
|
16
|
-
const opt = await setOpt({ table: 'gis.dataset' });
|
|
17
|
-
const data = await getOpt(opt);
|
|
18
|
-
// console.log(data);
|
|
19
|
-
assert.equal(data.table, 'gis.dataset');
|
|
20
|
-
});
|
|
21
|
-
const id = (Math.random() * 10000).toFixed();
|
|
22
|
-
await t.test('dataInsert', async () => {
|
|
23
|
-
const data = await dataInsert({ table: 'gis.dataset', data: { dataset_id: id, dataset_name: '222' } });
|
|
24
|
-
assert.equal(data.dataset_id, id);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
await t.test('dataUpdate', async () => {
|
|
28
|
-
const data = await dataUpdate({ table: 'gis.dataset', id, data: { dataset_name: '22211' } });
|
|
29
|
-
assert.equal(data.dataset_name, '22211');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
pgClients.client.query('delete from gis.dataset where dataset_id=$1', [id]);
|
|
33
|
-
t.after(() => {
|
|
34
|
-
pgClients.client?.end();
|
|
35
|
-
rclient.quit();
|
|
36
|
-
});
|
|
37
|
-
});
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert';
|
|
3
|
+
import '../config.js';
|
|
4
|
+
|
|
5
|
+
import pgClients from '../../pg/pgClients.js';
|
|
6
|
+
import rclient from '../../redis/client.js';
|
|
7
|
+
|
|
8
|
+
import dataInsert from '../../crud/funcs/dataInsert.js';
|
|
9
|
+
import dataUpdate from '../../crud/funcs/dataUpdate.js';
|
|
10
|
+
|
|
11
|
+
import getOpt from '../../crud/funcs/getOpt.js';
|
|
12
|
+
import setOpt from '../../crud/funcs/setOpt.js';
|
|
13
|
+
|
|
14
|
+
test('fucns crud', async (t) => {
|
|
15
|
+
await t.test('getOpt/setOpt', async () => {
|
|
16
|
+
const opt = await setOpt({ table: 'gis.dataset' });
|
|
17
|
+
const data = await getOpt(opt);
|
|
18
|
+
// console.log(data);
|
|
19
|
+
assert.equal(data.table, 'gis.dataset');
|
|
20
|
+
});
|
|
21
|
+
const id = (Math.random() * 10000).toFixed();
|
|
22
|
+
await t.test('dataInsert', async () => {
|
|
23
|
+
const data = await dataInsert({ table: 'gis.dataset', data: { dataset_id: id, dataset_name: '222' } });
|
|
24
|
+
assert.equal(data.dataset_id, id);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
await t.test('dataUpdate', async () => {
|
|
28
|
+
const data = await dataUpdate({ table: 'gis.dataset', id, data: { dataset_name: '22211' } });
|
|
29
|
+
assert.equal(data.dataset_name, '22211');
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
pgClients.client.query('delete from gis.dataset where dataset_id=$1', [id]);
|
|
33
|
+
t.after(() => {
|
|
34
|
+
pgClients.client?.end();
|
|
35
|
+
rclient.quit();
|
|
36
|
+
});
|
|
37
|
+
});
|
package/test/funcs/pg.test.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
|
-
|
|
4
|
-
import '../config.js';
|
|
5
|
-
|
|
6
|
-
import getMeta from '../../pg/funcs/getMeta.js';
|
|
7
|
-
import autoIndex from '../../pg/funcs/autoIndex.js';
|
|
8
|
-
import pgClients from '../../pg/pgClients.js';
|
|
9
|
-
import rclient from '../../redis/client.js';
|
|
10
|
-
|
|
11
|
-
test('funcs pg', async (t) => {
|
|
12
|
-
await t.test('getMeta', async () => {
|
|
13
|
-
const { columns } = await getMeta({ table: 'gis.dataset' });
|
|
14
|
-
// console.log(columns)
|
|
15
|
-
assert.ok(columns);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
await t.test('autoIndex', async () => {
|
|
19
|
-
await autoIndex({ table: 'gis.dataset', columns: ['service_type'] });
|
|
20
|
-
assert.ok(1);
|
|
21
|
-
});
|
|
22
|
-
t.after(() => {
|
|
23
|
-
pgClients.client.end();
|
|
24
|
-
rclient.quit();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert';
|
|
3
|
+
|
|
4
|
+
import '../config.js';
|
|
5
|
+
|
|
6
|
+
import getMeta from '../../pg/funcs/getMeta.js';
|
|
7
|
+
import autoIndex from '../../pg/funcs/autoIndex.js';
|
|
8
|
+
import pgClients from '../../pg/pgClients.js';
|
|
9
|
+
import rclient from '../../redis/client.js';
|
|
10
|
+
|
|
11
|
+
test('funcs pg', async (t) => {
|
|
12
|
+
await t.test('getMeta', async () => {
|
|
13
|
+
const { columns } = await getMeta({ table: 'gis.dataset' });
|
|
14
|
+
// console.log(columns)
|
|
15
|
+
assert.ok(columns);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
await t.test('autoIndex', async () => {
|
|
19
|
+
await autoIndex({ table: 'gis.dataset', columns: ['service_type'] });
|
|
20
|
+
assert.ok(1);
|
|
21
|
+
});
|
|
22
|
+
t.after(() => {
|
|
23
|
+
pgClients.client.end();
|
|
24
|
+
rclient.quit();
|
|
25
|
+
});
|
|
26
|
+
});
|
package/test/funcs/redis.test.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
|
-
|
|
4
|
-
import '../config.js';
|
|
5
|
-
|
|
6
|
-
import rclient from '../../redis/client.js';
|
|
7
|
-
|
|
8
|
-
test('funcs redis', async (t) => {
|
|
9
|
-
await t.test('get/set', async () => {
|
|
10
|
-
await rclient.set('test', '1');
|
|
11
|
-
const d = await rclient.get('test');
|
|
12
|
-
// console.log(columns)
|
|
13
|
-
assert.equal(d, '1');
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
t.after(() => {
|
|
17
|
-
rclient.quit();
|
|
18
|
-
});
|
|
19
|
-
});
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert';
|
|
3
|
+
|
|
4
|
+
import '../config.js';
|
|
5
|
+
|
|
6
|
+
import rclient from '../../redis/client.js';
|
|
7
|
+
|
|
8
|
+
test('funcs redis', async (t) => {
|
|
9
|
+
await t.test('get/set', async () => {
|
|
10
|
+
await rclient.set('test', '1');
|
|
11
|
+
const d = await rclient.get('test');
|
|
12
|
+
// console.log(columns)
|
|
13
|
+
assert.equal(d, '1');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
t.after(() => {
|
|
17
|
+
rclient.quit();
|
|
18
|
+
});
|
|
19
|
+
});
|
package/test/funcs/table.test.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
|
-
import '../config.js';
|
|
4
|
-
import pgClients from '../../pg/pgClients.js';
|
|
5
|
-
import rclient from '../../redis/client.js';
|
|
6
|
-
import getFilterSQL from '../../table/funcs/getFilterSQL/index.js';
|
|
7
|
-
|
|
8
|
-
test('fucns table', async (t) => {
|
|
9
|
-
await t.test('getMeta', async () => {
|
|
10
|
-
const data = await getFilterSQL({ table: 'gis.dataset', filter: 'service_type=1' });
|
|
11
|
-
// console.log(data);
|
|
12
|
-
assert.ok(data.q);
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
t.after(() => {
|
|
16
|
-
pgClients.client.end();
|
|
17
|
-
rclient.quit();
|
|
18
|
-
});
|
|
19
|
-
});
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert';
|
|
3
|
+
import '../config.js';
|
|
4
|
+
import pgClients from '../../pg/pgClients.js';
|
|
5
|
+
import rclient from '../../redis/client.js';
|
|
6
|
+
import getFilterSQL from '../../table/funcs/getFilterSQL/index.js';
|
|
7
|
+
|
|
8
|
+
test('fucns table', async (t) => {
|
|
9
|
+
await t.test('getMeta', async () => {
|
|
10
|
+
const data = await getFilterSQL({ table: 'gis.dataset', filter: 'service_type=1' });
|
|
11
|
+
// console.log(data);
|
|
12
|
+
assert.ok(data.q);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
t.after(() => {
|
|
16
|
+
pgClients.client.end();
|
|
17
|
+
rclient.quit();
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": 1,
|
|
4
|
-
"text": "test"
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
"id": 2,
|
|
8
|
-
"text": "test2"
|
|
9
|
-
}
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": 1,
|
|
4
|
+
"text": "test"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"id": 2,
|
|
8
|
+
"text": "test2"
|
|
9
|
+
}
|
|
10
10
|
]
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema": {
|
|
3
|
-
|
|
4
|
-
"cp_umuni_id": {
|
|
5
|
-
"type": "Text",
|
|
6
|
-
"ua": "ID UMUNI"
|
|
7
|
-
},
|
|
8
|
-
"cp_year": {
|
|
9
|
-
"type": "Text",
|
|
10
|
-
"ua": "Рік будівництва"
|
|
11
|
-
},
|
|
12
|
-
"cp_date_en_audit": {
|
|
13
|
-
"type": "DatePicker",
|
|
14
|
-
"ua": "Дата проведення останнього енергоаудиту"
|
|
15
|
-
},
|
|
16
|
-
"cp_certificate": {
|
|
17
|
-
"type": "Text",
|
|
18
|
-
"ua": "Сертифікат енергоефективності будівлі",
|
|
19
|
-
"help": "Вкажіть посилання"
|
|
20
|
-
},
|
|
21
|
-
"cp_pkd": {
|
|
22
|
-
"type": "Autocomplete",
|
|
23
|
-
"data": "customer_name",
|
|
24
|
-
"add": {
|
|
25
|
-
"model": "crm_acc.crm_account",
|
|
26
|
-
"ua": "Додати",
|
|
27
|
-
"form": "account_light.form"
|
|
28
|
-
},
|
|
29
|
-
"ua": "Замовник ПКД"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"label_style": "vertical"
|
|
1
|
+
{
|
|
2
|
+
"schema": {
|
|
3
|
+
|
|
4
|
+
"cp_umuni_id": {
|
|
5
|
+
"type": "Text",
|
|
6
|
+
"ua": "ID UMUNI"
|
|
7
|
+
},
|
|
8
|
+
"cp_year": {
|
|
9
|
+
"type": "Text",
|
|
10
|
+
"ua": "Рік будівництва"
|
|
11
|
+
},
|
|
12
|
+
"cp_date_en_audit": {
|
|
13
|
+
"type": "DatePicker",
|
|
14
|
+
"ua": "Дата проведення останнього енергоаудиту"
|
|
15
|
+
},
|
|
16
|
+
"cp_certificate": {
|
|
17
|
+
"type": "Text",
|
|
18
|
+
"ua": "Сертифікат енергоефективності будівлі",
|
|
19
|
+
"help": "Вкажіть посилання"
|
|
20
|
+
},
|
|
21
|
+
"cp_pkd": {
|
|
22
|
+
"type": "Autocomplete",
|
|
23
|
+
"data": "customer_name",
|
|
24
|
+
"add": {
|
|
25
|
+
"model": "crm_acc.crm_account",
|
|
26
|
+
"ua": "Додати",
|
|
27
|
+
"form": "account_light.form"
|
|
28
|
+
},
|
|
29
|
+
"ua": "Замовник ПКД"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"label_style": "vertical"
|
|
33
33
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
SELECT account_id, account_name FROM crm_acc.crm_account
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"key": "dataset_id"
|
|
1
|
+
{
|
|
2
|
+
"key": "dataset_id"
|
|
3
3
|
}
|
|
@@ -1,43 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"columns": [
|
|
3
|
-
{
|
|
4
|
-
"name": "dataset_id",
|
|
5
|
-
"title": "22"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"name": "dataset_name",
|
|
9
|
-
"title": "dataset_name"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"table": "gis.dataset",
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"name": "
|
|
18
|
-
"type": "
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
"ua": "Рік будівництва",
|
|
22
|
-
"name": "cp_year",
|
|
23
|
-
"type": "Text"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"ua": "Замовник ПКД",
|
|
27
|
-
"data": "customer_name",
|
|
28
|
-
"name": "cp_pkd",
|
|
29
|
-
"type": "Text"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"ua": "Наявність енергоаудиту",
|
|
33
|
-
"name": "cp_date_en_audit",
|
|
34
|
-
"type": "Date"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"ua": "Знак сертифікату",
|
|
38
|
-
"data": "cp_certificate_mark",
|
|
39
|
-
"name": "cp_certificate_mark",
|
|
40
|
-
"type": "Check"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"columns": [
|
|
3
|
+
{
|
|
4
|
+
"name": "dataset_id",
|
|
5
|
+
"title": "22"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "dataset_name",
|
|
9
|
+
"title": "dataset_name"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"table": "gis.dataset",
|
|
13
|
+
"order": "dataset_name",
|
|
14
|
+
"filters": [
|
|
15
|
+
{
|
|
16
|
+
"ua": "Назва набору",
|
|
17
|
+
"name": "dataset_name",
|
|
18
|
+
"type": "text"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
43
21
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"table": "site.page_node",
|
|
3
|
+
"key": "alias",
|
|
4
|
+
"query": "t.category_id='3060540645924931148' and t.enabled and t.lang='ua'",
|
|
5
|
+
"orderby": "value_number",
|
|
6
|
+
"sql": [
|
|
7
|
+
{
|
|
8
|
+
"sql": "select object_id,value_number from site.page_node_data where attr='ord' and t.nid=object_id limit 1",
|
|
9
|
+
"name": "page_node_data_sql"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"columns": [
|
|
13
|
+
"title",
|
|
14
|
+
"alias",
|
|
15
|
+
"teaser",
|
|
16
|
+
"image"
|
|
17
|
+
]
|
|
18
|
+
}
|