qravan 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +11 -11
- data/LICENSE +1 -1
- data/README.md +156 -31
- data/Rakefile +1 -1
- data/examples/demo/postgres_prostore_vehicles/smevql_postgres_localhost.dump +151 -0
- data/examples/demo/postgres_vehicles/smevql_postgres_localhost.dump +285 -0
- data/lib/qravan/resource/resource.rb +14 -4
- data/lib/qravan/version.rb +1 -1
- data/models/current/model.yaml +32 -1
- data/models/vehicles/1.0/model.yaml +32 -1
- data/qravan.gemspec +2 -1
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df74997ef0fca762d8655217ccead05a19e05a1b586af7fd398459a7c213b7e9
|
4
|
+
data.tar.gz: 6b79852098269c1bb778e96dd9372cd2648c69d6733799d08274ccd3f93f3670
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 580383f25e4f65d4c345c64d8461d5863f1e0e02d959695ec89aea81cd7a170cb11217dad44fcb77087000999632d668756159d58f1a5b0cf04f6653bae19de6
|
7
|
+
data.tar.gz: e624a1fe8a43fb84f998b1819f9de99197d8baaaf0262a25be9e28c44e0e521cd1cd8dac9a94bf930c21e863163b6cc5ce18be87c3c33f03d37be8929f9333a8
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
qravan (0.1.
|
4
|
+
qravan (0.1.1)
|
5
5
|
async (~> 1.30.1)
|
6
6
|
async-http (~> 0.59.2)
|
7
7
|
async-io (~> 1.34.1)
|
8
8
|
async-sequel (~> 0.1.0)
|
9
9
|
falcon (~> 0.42.3)
|
10
10
|
logger (>= 1.5.3)
|
11
|
-
rack (~> 3.0.
|
11
|
+
rack (~> 3.0.4.1)
|
12
12
|
rack-unreloader (>= 1.8)
|
13
13
|
rake (~> 13.0)
|
14
14
|
redis (~> 5.0.5)
|
@@ -86,13 +86,13 @@ GEM
|
|
86
86
|
protocol-rack (0.2.4)
|
87
87
|
protocol-http (~> 0.23)
|
88
88
|
rack (>= 1.0)
|
89
|
-
rack (3.0.
|
90
|
-
rack-unreloader (2.
|
89
|
+
rack (3.0.4.1)
|
90
|
+
rack-unreloader (2.1.0)
|
91
91
|
rainbow (3.1.1)
|
92
92
|
rake (13.0.6)
|
93
|
-
redis (5.0.
|
93
|
+
redis (5.0.6)
|
94
94
|
redis-client (>= 0.9.0)
|
95
|
-
redis-client (0.
|
95
|
+
redis-client (0.12.1)
|
96
96
|
connection_pool
|
97
97
|
regexp_parser (2.6.1)
|
98
98
|
rexml (3.2.5)
|
@@ -102,23 +102,23 @@ GEM
|
|
102
102
|
rspec-mocks (~> 3.12.0)
|
103
103
|
rspec-core (3.12.0)
|
104
104
|
rspec-support (~> 3.12.0)
|
105
|
-
rspec-expectations (3.12.
|
105
|
+
rspec-expectations (3.12.2)
|
106
106
|
diff-lcs (>= 1.2.0, < 2.0)
|
107
107
|
rspec-support (~> 3.12.0)
|
108
|
-
rspec-mocks (3.12.
|
108
|
+
rspec-mocks (3.12.3)
|
109
109
|
diff-lcs (>= 1.2.0, < 2.0)
|
110
110
|
rspec-support (~> 3.12.0)
|
111
111
|
rspec-support (3.12.0)
|
112
|
-
rubocop (1.
|
112
|
+
rubocop (1.43.0)
|
113
113
|
json (~> 2.3)
|
114
114
|
parallel (~> 1.10)
|
115
|
-
parser (>= 3.
|
115
|
+
parser (>= 3.2.0.0)
|
116
116
|
rainbow (>= 2.2.2, < 4.0)
|
117
117
|
regexp_parser (>= 1.8, < 3.0)
|
118
118
|
rexml (>= 3.2.5, < 4.0)
|
119
119
|
rubocop-ast (>= 1.24.1, < 2.0)
|
120
120
|
ruby-progressbar (~> 1.7)
|
121
|
-
unicode-display_width (>=
|
121
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
122
122
|
rubocop-ast (1.24.1)
|
123
123
|
parser (>= 3.1.1.0)
|
124
124
|
ruby-progressbar (1.11.0)
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
# Qravan
|
2
|
-
Qravan — сервер для быстрого создания API обмена данными, консолидирующий различные источники с SQL
|
2
|
+
Qravan _[карав`ан]_ — сервер для быстрого создания API обмена данными, консолидирующий различные источники с SQL-интерфейсами (СУБД или REST).
|
3
3
|
|
4
4
|
![](assets/images/qravan.png)
|
5
5
|
## Установка
|
6
|
+
Установить как GEM (**предпочтительно**):
|
6
7
|
|
7
|
-
|
8
|
+
$ gem install qravan
|
9
|
+
|
10
|
+
**Или** добавить строку ниже в свой Gemfile:
|
8
11
|
|
9
12
|
```ruby
|
10
13
|
gem 'qravan'
|
@@ -14,23 +17,20 @@ gem 'qravan'
|
|
14
17
|
|
15
18
|
$ bundle install
|
16
19
|
|
17
|
-
Или установить просто как Gem (предпочтительно):
|
18
|
-
|
19
|
-
$ gem install qravan
|
20
20
|
|
21
21
|
## Запуск
|
22
22
|
Запустить сервер Qravan:
|
23
23
|
|
24
24
|
$ qravan
|
25
25
|
|
26
|
-
Сервер станет доступен по адресу `http://localhost:3300
|
26
|
+
Сервер станет доступен по адресу `http://localhost:3300/`. В базовую поставку включены демонстрационные источники `postgres`, `prostore` и модель `vehicles`.
|
27
27
|
|
28
28
|
## Методы сервера
|
29
29
|
Сервер содержит следующие методы:
|
30
|
-
1. GET /ping — проверить запусщенность сервера (ответ PONG!)
|
31
|
-
2. GET /
|
32
|
-
3. GET /sources — список загруженных источников
|
33
|
-
4. POST /data — выполнить запрос
|
30
|
+
1. GET http://localhost:3300/ping — проверить запусщенность сервера (ответ PONG!)
|
31
|
+
2. GET http://localhost:3300/model — список загруженных моделей
|
32
|
+
3. GET http://localhost:3300/sources — список загруженных источников
|
33
|
+
4. POST http://localhost:3300/data — выполнить запрос
|
34
34
|
|
35
35
|
|
36
36
|
## Настройка моделей данных и ресурсов
|
@@ -76,33 +76,62 @@ qravan
|
|
76
76
|
```
|
77
77
|
## Пример использования
|
78
78
|
|
79
|
+
### Демо-данные
|
80
|
+
В составе Qravan описаны демо-модели и источники. Также в папке `examples` лежат дампы (`pg_dump`) Postgres, достаточные для проверок ниже.
|
81
|
+
|
82
|
+
### Запросы к демо-данным
|
79
83
|
Запрос объединенных данных о владельце автомобиля из Prostore и Postgres:
|
80
84
|
```json
|
81
85
|
{
|
82
86
|
"query":{
|
83
87
|
"driver":{
|
84
88
|
"conditions":{
|
85
|
-
"
|
86
|
-
"
|
89
|
+
"driverlicensetype":"E",
|
90
|
+
"drivermiddlename":"Александрович"
|
87
91
|
},
|
88
92
|
"attributes":[
|
89
93
|
"DriverLastname",
|
90
94
|
"DriverFirstname",
|
91
95
|
"DriverMiddlename",
|
92
|
-
"
|
93
|
-
|
96
|
+
"driverlicensetype"
|
97
|
+
|
98
|
+
]
|
99
|
+
},
|
100
|
+
"super_driver":{
|
101
|
+
"conditions":{
|
102
|
+
"driverlicensetype":"D",
|
103
|
+
"driverfirstname": "Евгений"
|
104
|
+
},
|
105
|
+
"attributes":[
|
106
|
+
"DriverLastname",
|
107
|
+
"DriverFirstname",
|
108
|
+
"DriverMiddlename",
|
109
|
+
"driverlicensetype"
|
110
|
+
|
111
|
+
]
|
94
112
|
},
|
95
113
|
"driver_license":{
|
96
114
|
"conditions":{
|
97
|
-
"
|
98
|
-
"
|
115
|
+
"driverlicensetype":"C",
|
116
|
+
"driverlicensetypeid": 1
|
99
117
|
},
|
100
118
|
"attributes":[
|
101
119
|
"DriverLastname",
|
102
120
|
"DriverFirstname",
|
103
121
|
"DriverMiddlename",
|
104
122
|
"Driverlicenseid"
|
105
|
-
|
123
|
+
]
|
124
|
+
},
|
125
|
+
"identity_document":{
|
126
|
+
"conditions": {
|
127
|
+
"driverlicensetypeid": 4
|
128
|
+
},
|
129
|
+
"attributes":[
|
130
|
+
"driverlicenseissuer",
|
131
|
+
"DriverLicenseSerNum",
|
132
|
+
"driverlicensetype"
|
133
|
+
|
134
|
+
]
|
106
135
|
}
|
107
136
|
},
|
108
137
|
"credentials":{
|
@@ -136,37 +165,128 @@ qravan
|
|
136
165
|
"driver": [
|
137
166
|
[
|
138
167
|
{
|
139
|
-
"driverlastname": "
|
140
|
-
"driverfirstname": "
|
141
|
-
"drivermiddlename": "
|
142
|
-
"
|
168
|
+
"driverlastname": "Козлов",
|
169
|
+
"driverfirstname": "Кирилл",
|
170
|
+
"drivermiddlename": "Александрович",
|
171
|
+
"driverlicensetype": "E"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"driverlastname": "Фёдоров",
|
175
|
+
"driverfirstname": "Михаил",
|
176
|
+
"drivermiddlename": "Александрович",
|
177
|
+
"driverlicensetype": "E"
|
143
178
|
}
|
144
179
|
],
|
145
180
|
{
|
146
|
-
"time": "REST Duration: 0.
|
181
|
+
"time": "REST Duration: 0.21902s "
|
182
|
+
}
|
183
|
+
]
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"super_driver": [
|
187
|
+
[
|
188
|
+
{
|
189
|
+
"driverlastname": "Белов",
|
190
|
+
"driverfirstname": "Евгений",
|
191
|
+
"drivermiddlename": "Витальевич",
|
192
|
+
"driverlicensetype": "D"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"driverlastname": "Комаров",
|
196
|
+
"driverfirstname": "Евгений",
|
197
|
+
"drivermiddlename": "Александрович",
|
198
|
+
"driverlicensetype": "D"
|
199
|
+
}
|
200
|
+
],
|
201
|
+
{
|
202
|
+
"time": "REST Duration: 0.022836s "
|
147
203
|
}
|
148
204
|
]
|
149
205
|
},
|
150
206
|
{
|
151
207
|
"driver_license": [
|
152
208
|
{
|
153
|
-
"driverlastname": "
|
154
|
-
"driverfirstname": "
|
155
|
-
"drivermiddlename": "
|
156
|
-
"driverlicenseid":
|
209
|
+
"driverlastname": "Беляев",
|
210
|
+
"driverfirstname": "Алексей",
|
211
|
+
"drivermiddlename": "Николаевич",
|
212
|
+
"driverlicenseid": 32
|
213
|
+
},
|
214
|
+
{
|
215
|
+
"driverlastname": "Соловьёв",
|
216
|
+
"driverfirstname": "Леонид",
|
217
|
+
"drivermiddlename": "Иванович",
|
218
|
+
"driverlicenseid": 26
|
157
219
|
},
|
158
220
|
{
|
159
|
-
"
|
221
|
+
"driverlastname": "Михайлов",
|
222
|
+
"driverfirstname": "Александр",
|
223
|
+
"drivermiddlename": "Георгиевич",
|
224
|
+
"driverlicenseid": 34
|
225
|
+
},
|
226
|
+
{
|
227
|
+
"time": "DB Duration: 0.00319s"
|
228
|
+
}
|
229
|
+
]
|
230
|
+
},
|
231
|
+
{
|
232
|
+
"identity_document": [
|
233
|
+
{
|
234
|
+
"driverlicenseissuer": "44261",
|
235
|
+
"driverlicensesernum": "32662",
|
236
|
+
"driverlicensetype": "B"
|
237
|
+
},
|
238
|
+
{
|
239
|
+
"driverlicenseissuer": "32203",
|
240
|
+
"driverlicensesernum": "39303",
|
241
|
+
"driverlicensetype": "A"
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"driverlicenseissuer": "43233",
|
245
|
+
"driverlicensesernum": "30101",
|
246
|
+
"driverlicensetype": "A"
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"driverlicenseissuer": "45275",
|
250
|
+
"driverlicensesernum": "42336",
|
251
|
+
"driverlicensetype": "B"
|
252
|
+
},
|
253
|
+
{
|
254
|
+
"driverlicenseissuer": "46690",
|
255
|
+
"driverlicensesernum": "31614",
|
256
|
+
"driverlicensetype": "A"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"driverlicenseissuer": "37435",
|
260
|
+
"driverlicensesernum": "47250",
|
261
|
+
"driverlicensetype": "B"
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"driverlicenseissuer": "36823",
|
265
|
+
"driverlicensesernum": "45173",
|
266
|
+
"driverlicensetype": "C"
|
267
|
+
},
|
268
|
+
{
|
269
|
+
"driverlicenseissuer": "33728",
|
270
|
+
"driverlicensesernum": "43290",
|
271
|
+
"driverlicensetype": "C"
|
272
|
+
},
|
273
|
+
{
|
274
|
+
"driverlicenseissuer": "41989",
|
275
|
+
"driverlicensesernum": "47023",
|
276
|
+
"driverlicensetype": "C"
|
277
|
+
},
|
278
|
+
{
|
279
|
+
"time": "DB Duration: 0.001113s"
|
160
280
|
}
|
161
281
|
]
|
162
282
|
}
|
163
283
|
],
|
164
284
|
"credentials": {
|
165
285
|
"response": {
|
166
|
-
"id": "
|
167
|
-
"sub_id": "
|
168
|
-
"started_at": "2023-01-
|
169
|
-
"finished_at": "2023-01-
|
286
|
+
"id": "4201414d-fa86-4221-9d15-f91c10356daa",
|
287
|
+
"sub_id": "a59ea446-5dca-4705-bca5-53d6569e58a2",
|
288
|
+
"started_at": "2023-01-20 12:34:25 +0300",
|
289
|
+
"finished_at": "2023-01-20 12:34:25 +0300"
|
170
290
|
},
|
171
291
|
"system": {
|
172
292
|
"mnemonic": "117bed7f-1c07-4079-a446-1161588db4e5",
|
@@ -189,3 +309,8 @@ qravan
|
|
189
309
|
}
|
190
310
|
}
|
191
311
|
```
|
312
|
+
|
313
|
+
## Лицензирование
|
314
|
+
Qravan распространяется под открытой лицензией [CAPAAL](LICENSE).
|
315
|
+
|
316
|
+
Copyright (c) 2022 Panasenkov Alexander (apanasenkov@capaa.ru)
|
data/Rakefile
CHANGED
@@ -0,0 +1,151 @@
|
|
1
|
+
--
|
2
|
+
-- PostgreSQL database dump
|
3
|
+
--
|
4
|
+
|
5
|
+
-- Dumped from database version 13.0
|
6
|
+
-- Dumped by pg_dump version 13.3
|
7
|
+
|
8
|
+
SET statement_timeout = 0;
|
9
|
+
SET lock_timeout = 0;
|
10
|
+
SET idle_in_transaction_session_timeout = 0;
|
11
|
+
SET client_encoding = 'UTF8';
|
12
|
+
SET standard_conforming_strings = on;
|
13
|
+
SELECT pg_catalog.set_config('search_path', '', false);
|
14
|
+
SET check_function_bodies = false;
|
15
|
+
SET xmloption = content;
|
16
|
+
SET client_min_messages = warning;
|
17
|
+
SET row_security = off;
|
18
|
+
|
19
|
+
DROP DATABASE IF EXISTS smevql;
|
20
|
+
--
|
21
|
+
-- Name: smevql; Type: DATABASE; Schema: -; Owner: smevql
|
22
|
+
--
|
23
|
+
|
24
|
+
CREATE DATABASE smevql WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.UTF-8';
|
25
|
+
|
26
|
+
|
27
|
+
ALTER DATABASE smevql OWNER TO smevql;
|
28
|
+
|
29
|
+
\connect smevql
|
30
|
+
|
31
|
+
SET statement_timeout = 0;
|
32
|
+
SET lock_timeout = 0;
|
33
|
+
SET idle_in_transaction_session_timeout = 0;
|
34
|
+
SET client_encoding = 'UTF8';
|
35
|
+
SET standard_conforming_strings = on;
|
36
|
+
SELECT pg_catalog.set_config('search_path', '', false);
|
37
|
+
SET check_function_bodies = false;
|
38
|
+
SET xmloption = content;
|
39
|
+
SET client_min_messages = warning;
|
40
|
+
SET row_security = off;
|
41
|
+
|
42
|
+
SET default_tablespace = '';
|
43
|
+
|
44
|
+
SET default_table_access_method = heap;
|
45
|
+
|
46
|
+
--
|
47
|
+
-- Name: driverlicenseql3; Type: TABLE; Schema: smevql1; Owner: smevql
|
48
|
+
--
|
49
|
+
|
50
|
+
CREATE TABLE smevql1.driverlicenseql3 (
|
51
|
+
driverlicensetypeid bigint,
|
52
|
+
driverlicensetype character varying,
|
53
|
+
driverlicensesernum character varying,
|
54
|
+
norm_driverlicensesernum character varying,
|
55
|
+
driverlicenseissuedate date,
|
56
|
+
driverlicenseduedate date,
|
57
|
+
driverlicenseissuer character varying,
|
58
|
+
driverlicenseissuerregion character varying,
|
59
|
+
driverlicensecategories character varying,
|
60
|
+
driverlicenseexperience character varying,
|
61
|
+
driverlicensespecmark character varying,
|
62
|
+
driverlicensephoto character varying,
|
63
|
+
driverdoctypeid character varying,
|
64
|
+
driverdoctype character varying,
|
65
|
+
driverdocsernum character varying,
|
66
|
+
driverdocissuedate date,
|
67
|
+
driverlastname character varying,
|
68
|
+
driverfirstname character varying,
|
69
|
+
drivermiddlename character varying,
|
70
|
+
driverbirthdate date,
|
71
|
+
driverbirthregionid character varying,
|
72
|
+
driverbirthregion character varying,
|
73
|
+
driverbirthplace character varying,
|
74
|
+
driverbasedoctypeid bigint,
|
75
|
+
driverbasedoctype character varying,
|
76
|
+
driverbasesernum character varying,
|
77
|
+
driverbaseissuer character varying,
|
78
|
+
driverbaseissuedate date,
|
79
|
+
driverbaseduedate date,
|
80
|
+
driverlicensestatus bigint,
|
81
|
+
driverlicenseoperationcode bigint,
|
82
|
+
driverlicenseoperationname character varying,
|
83
|
+
driverlicenseid bigint NOT NULL,
|
84
|
+
driverlicenseissuercode character varying,
|
85
|
+
driveraddressregion character varying,
|
86
|
+
driverlicensecategoriesfull character varying,
|
87
|
+
driverlicenseqr character varying
|
88
|
+
);
|
89
|
+
|
90
|
+
|
91
|
+
ALTER TABLE smevql1.driverlicenseql3 OWNER TO smevql;
|
92
|
+
|
93
|
+
--
|
94
|
+
-- Data for Name: driverlicenseql3; Type: TABLE DATA; Schema: smevql1; Owner: smevql
|
95
|
+
--
|
96
|
+
|
97
|
+
COPY smevql1.driverlicenseql3 (driverlicensetypeid, driverlicensetype, driverlicensesernum, norm_driverlicensesernum, driverlicenseissuedate, driverlicenseduedate, driverlicenseissuer, driverlicenseissuerregion, driverlicensecategories, driverlicenseexperience, driverlicensespecmark, driverlicensephoto, driverdoctypeid, driverdoctype, driverdocsernum, driverdocissuedate, driverlastname, driverfirstname, drivermiddlename, driverbirthdate, driverbirthregionid, driverbirthregion, driverbirthplace, driverbasedoctypeid, driverbasedoctype, driverbasesernum, driverbaseissuer, driverbaseissuedate, driverbaseduedate, driverlicensestatus, driverlicenseoperationcode, driverlicenseoperationname, driverlicenseid, driverlicenseissuercode, driveraddressregion, driverlicensecategoriesfull, driverlicenseqr) FROM stdin;
|
98
|
+
5 E 41604\r 37384 \N \N 40177 41328 39929 41273 45818 33612 46509 45720 49725 \N Иванов Петр Петрович \N 9830 9933 9029 9067 9881 9297 9811 \N \N 9591 9197 9616 6 9844 9765 9031 9199\r
|
99
|
+
4 E 43014\r 49968 \N \N 39263 33510 46216 32170 39353 47572 40261 41034 42802 \N Смирнов Иван Иванович \N 9044 9813 9881 9328 9221 9939 9720 \N \N 9183 9265 9150 22 9784 9192 9622 9284\r
|
100
|
+
5 E 33804\r 30343 \N \N 45400 43064 41106 42632 48333 32216 48814 40013 39843 \N Козлов Кирилл Александрович \N 9193 9223 9215 9322 9802 9549 9613 \N \N 9742 9810 9617 12 9953 9455 9538 9581\r
|
101
|
+
2 D 32563\r 44522 \N \N 37435 31271 47627 36037 40230 35079 43076 46020 45352 \N Морозов Дмитрий Александрович \N 9908 9666 9487 9578 9745 9967 9553 \N \N 9231 9216 9758 13 9552 9813 9072 9752\r
|
102
|
+
4 E 34651\r 47132 \N \N 34843 45802 40168 48379 32442 48267 30145 37842 39505 \N Васильев Сергей Викторович \N 9612 9767 9911 9577 9348 9095 9044 \N \N 9652 9973 9091 5 9133 9270 9298 9655\r
|
103
|
+
2 D 48629\r 45781 \N \N 46798 39543 33819 42643 45076 38441 48697 41322 48927 \N Петров Александр Александрович \N 9547 9759 9495 9474 9123 9187 9988 \N \N 9096 9799 9231 25 9597 9857 9394 9957\r
|
104
|
+
5 D 37032\r 48544 \N \N 43155 39219 40338 45451 46554 46035 49409 30710 40314 \N Попов Владимир Владимирович \N 9279 9431 9086 9956 9076 9624 9299 \N \N 9532 9245 9122 38 9654 9638 9276 9006\r
|
105
|
+
3 E 38578\r 39339 \N \N 42974 44047 36268 38479 37347 37680 33099 40084 46868 \N Соколов Александр Викторович \N 9544 9119 9148 9108 9188 9097 9994 \N \N 9684 9562 9976 27 9396 9699 9093 9520\r
|
106
|
+
4 D 49133\r 40423 \N \N 45874 49247 31668 32622 32364 49951 49727 44777 36434 \N Соловьёв Леонид Иванович \N 9563 9684 9560 9316 9942 9434 9095 \N \N 9653 9693 9471 36 9787 9739 9546 9538\r
|
107
|
+
2 D 41414\r 30305 \N \N 39796 35826 38849 46806 30651 34581 45212 30432 33118 \N Кузнецов Валерий Евгеньевич \N 9960 9604 9043 9854 9470 9807 9729 \N \N 9348 9293 9180 32 9881 9133 9429 9345\r
|
108
|
+
5 M 32759 37557 \N \N 35267 38135 33907 31819 32383 32062 40067 45956 45417 \N Новиков Олег Александрович \N 9299 9592 9424 9433 9812 9889 9557 \N \N 9180 9657 9760 20 9715 9423 9904 9936\r
|
109
|
+
4 D 49565\r 48550 \N \N 47215 30616 32399 38732 31737 31835 45174 41982 36091 \N Лебедев Ильнар Мансурович \N 9740 9324 9797 9732 9795 9308 9934 \N \N 9941 9462 9570 29 9419 9697 9821 9851\r
|
110
|
+
2 M 46626\r 46855 \N \N 33728 33881 35389 31875 47865 44560 33564 44218 32614 \N Волков Юлия Олеговна \N 9312 9443 9550 9657 9679 9761 9150 \N \N 9118 9303 9932 31 9082 9916 9715 9482\r
|
111
|
+
4 D 36464\r 41220 \N \N 31438 45520 45062 39925 47256 38069 40824 34952 44989 \N Воробьёв Василий Вячеславович \N 9065 9408 9962 9110 9314 9600 9353 \N \N 9593 9074 9279 1 9767 9750 9261 9834\r
|
112
|
+
5 D 45367\r 31492 \N \N 38366 40906 44907 49044 35945 41825 30210 45992 38756 \N Богданов Денис Андреевич \N 9296 9397 9621 9469 9453 9414 9339 \N \N 9855 9917 9421 26 9976 9154 9502 9866\r
|
113
|
+
2 M 30604\r 40945 \N \N 32443 34934 44106 39005 30392 38738 44331 33681 37819 \N Зайцев Елизавета Григорьевна \N 9541 9442 9288 9677 9080 9605 9447 \N \N 9762 9954 9486 28 9688 9778 9632 9674\r
|
114
|
+
2 D 39019\r 31036 \N \N 47898 37020 43695 41831 36560 40674 39528 31263 31560 \N Семёнов Тимур Маратович \N 9863 9000 9773 9011 9245 9351 9772 \N \N 9848 9957 9481 30 9502 9052 9570 9251\r
|
115
|
+
5 M 37616\r 49707 \N \N 43504 49493 44018 48965 40481 45554 35884 45193 40204 \N Тарасов Илья Михайлович \N 9118 9426 9685 9151 9268 9311 9243 \N \N 9074 9151 9367 17 9469 9424 9402 9991\r
|
116
|
+
2 D 36212\r 32756 \N \N 49754 34948 47887 40130 45544 34825 43672 40673 30724 \N Павлов Вячеслав Александрович \N 9740 9126 9837 9523 9603 9652 9524 \N \N 9771 9793 9738 18 9442 9691 9074 9233\r
|
117
|
+
4 E 42102\r 40116 \N \N 46690 39885 32469 43751 34759 45648 41614 38868 43866 \N Фёдоров Михаил Александрович \N 9635 9214 9479 9103 9763 9118 9504 \N \N 9314 9212 9631 8 9122 9088 9145 9874\r
|
118
|
+
5 E 42823\r 49667 \N \N 34703 47154 41051 47236 48240 40666 47886 36700 44919 \N Голубев Камиль Гадиятулаевич \N 9007 9688 9084 9547 9539 9876 9584 \N \N 9976 9143 9302 10 9707 9029 9887 9245\r
|
119
|
+
2 D 34570\r 35336 \N \N 44261 48726 32627 40788 30656 35460 40879 34530 43350 \N Белов Евгений Витальевич \N 9484 9196 9981 9285 9678 9308 9804 \N \N 9045 9373 9632 14 9924 9503 9097 9527\r
|
120
|
+
3 M 31199\r 30578 \N \N 30541 40497 36928 34481 38586 30600 46313 49630 31381 \N Михайлов Александр Георгиевич \N 9844 9049 9330 9052 9770 9640 9672 \N \N 9898 9667 9295 19 9321 9926 9492 9437\r
|
121
|
+
4 D 48463\r 33698 \N \N 36513 31836 41753 47511 34752 40571 38507 41635 32441 \N Комаров Евгений Александрович \N 9211 9334 9952 9756 9881 9934 9465 \N \N 9026 9237 9399 23 9911 9102 9403 9919\r
|
122
|
+
4 E 45223\r 30893 \N \N 35264 39076 46607 31430 32989 30502 44350 34403 41518 \N Беляев Алексей Николаевич \N 9347 9220 9921 9908 9847 9461 9572 \N \N 9975 9097 9453 11 9315 9222 9249 9350\r
|
123
|
+
2 D 43707\r 49502 \N \N 43233 35838 39282 44456 42490 34504 36989 42232 43540 \N Виноградов Павел Викторович \N 9940 9293 9415 9250 9145 9099 9957 \N \N 9757 9062 9103 2 9745 9683 9635 9554\r
|
124
|
+
4 D 49656\r 46817 \N \N 44135 33942 37246 49326 36748 46344 30450 30903 48074 \N Куликов Георгий Евгеньевич \N 9237 9298 9567 9534 9069 9243 9602 \N \N 9440 9945 9625 16 9409 9332 9894 9221\r
|
125
|
+
4 M 42809\r 49686 \N \N 45030 48543 42333 40415 44934 40121 48777 35466 43760 \N Алексеев Дмитрий Владимирович \N 9494 9592 9175 9265 9334 9053 9838 \N \N 9155 9564 9603 3 9304 9597 9820 9556\r
|
126
|
+
2 E 38491\r 49526 \N \N 34753 44902 33918 39376 43744 31151 37193 47518 43957 \N Баранов Роман Сергеевич \N 9864 9278 9420 9970 9717 9535 9167 \N \N 9294 9003 9849 34 9798 9536 9242 9168\r
|
127
|
+
2 D 47039\r 34627 \N \N 36823 40711 34258 37334 36470 30436 40908 42419 36103 \N Кудрявцев Светлана Валерьевна \N 9832 9083 9159 9687 9374 9076 9736 \N \N 9300 9783 9494 33 9376 9006 9880 9758\r
|
128
|
+
2 D 35338\r 46756 \N \N 39614 33621 32434 32457 37554 41064 46467 47084 31542 \N Макаров Всеволод Дмитриевич \N 9988 9426 9749 9478 9615 9038 9793 \N \N 9422 9001 9640 15 9951 9502 9882 9315\r
|
129
|
+
2 E 47895\r 38968 \N \N 38545 49422 49170 46406 40350 40978 45942 35251 44989 \N Титов Николай Викторович \N 9892 9253 9959 9421 9757 9800 9342 \N \N 9600 9056 9940 9 9436 9500 9296 9263\r
|
130
|
+
4 D 43082\r 40600 \N \N 41989 43303 48229 38314 45012 32411 31609 35249 43515 \N Гусев Александр Сергеевич \N 9625 9045 9987 9843 9101 9083 9403 \N \N 9768 9932 9360 35 9822 9758 9887 9475\r
|
131
|
+
2 E 39246\r 38066 \N \N 32203 44209 47451 49260 36593 39282 41299 46188 49000 \N Ковалёв Филипп Арсенович \N 9676 9358 9679 9281 9291 9636 9985 \N \N 9812 9787 9111 39 9313 9360 9243 9923
|
132
|
+
3 M 33755\r 44247 \N \N 34063 44357 48029 37386 35262 34391 47193 34787 32237 \N Киселёв Евгений Александрович \N 9194 9650 9508 9942 9166 9157 9336 \N \N 9178 9937 9438 4 9714 9413 9106 9585\r
|
133
|
+
2 E 35077\r 49020 \N \N 45275 33979 43352 49691 47660 42356 37954 37598 42647 \N Кузьмин Денис Алексеевич \N 9519 9621 9298 9571 9014 9002 9382 \N \N 9345 9595 9339 21 9175 9139 9158 9319\r
|
134
|
+
5 D 39253\r 45223 \N \N 40100 37531 36153 43895 48651 40730 45967 40089 46655 \N Ильин Иван Сергеевич \N 9450 9832 9354 9589 9069 9993 9214 \N \N 9703 9607 9980 24 9453 9251 9281 9306\r
|
135
|
+
4 M 41409\r 37431 \N \N 36135 38292 41915 35949 33008 47121 33838 31724 34843 \N Орлов Олег Николаевич \N 9426 9603 9372 9072 9389 9065 9731 \N \N 9892 9958 9420 7 9476 9152 9768 9656\r
|
136
|
+
3 D 41220\r 33479 \N \N 35166 46645 48648 47556 46967 42661 30908 33909 31017 \N Андреев Мария Анатольевна \N 9489 9814 9097 9759 9087 9665 9173 \N \N 9867 9167 9953 37 9017 9425 9946 9720\r
|
137
|
+
\.
|
138
|
+
|
139
|
+
|
140
|
+
--
|
141
|
+
-- Name: driverlicenseql3 driverlicenseql_pkey; Type: CONSTRAINT; Schema: smevql1; Owner: smevql
|
142
|
+
--
|
143
|
+
|
144
|
+
ALTER TABLE ONLY smevql1.driverlicenseql3
|
145
|
+
ADD CONSTRAINT driverlicenseql_pkey PRIMARY KEY (driverlicenseid);
|
146
|
+
|
147
|
+
|
148
|
+
--
|
149
|
+
-- PostgreSQL database dump complete
|
150
|
+
--
|
151
|
+
|
@@ -0,0 +1,285 @@
|
|
1
|
+
--
|
2
|
+
-- PostgreSQL database dump
|
3
|
+
--
|
4
|
+
|
5
|
+
-- Dumped from database version 13.0
|
6
|
+
-- Dumped by pg_dump version 13.3
|
7
|
+
|
8
|
+
SET statement_timeout = 0;
|
9
|
+
SET lock_timeout = 0;
|
10
|
+
SET idle_in_transaction_session_timeout = 0;
|
11
|
+
SET client_encoding = 'UTF8';
|
12
|
+
SET standard_conforming_strings = on;
|
13
|
+
SELECT pg_catalog.set_config('search_path', '', false);
|
14
|
+
SET check_function_bodies = false;
|
15
|
+
SET xmloption = content;
|
16
|
+
SET client_min_messages = warning;
|
17
|
+
SET row_security = off;
|
18
|
+
|
19
|
+
DROP DATABASE IF EXISTS smevql;
|
20
|
+
--
|
21
|
+
-- Name: smevql; Type: DATABASE; Schema: -; Owner: smevql
|
22
|
+
--
|
23
|
+
|
24
|
+
CREATE DATABASE smevql WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.UTF-8';
|
25
|
+
|
26
|
+
|
27
|
+
ALTER DATABASE smevql OWNER TO smevql;
|
28
|
+
|
29
|
+
\connect smevql
|
30
|
+
|
31
|
+
SET statement_timeout = 0;
|
32
|
+
SET lock_timeout = 0;
|
33
|
+
SET idle_in_transaction_session_timeout = 0;
|
34
|
+
SET client_encoding = 'UTF8';
|
35
|
+
SET standard_conforming_strings = on;
|
36
|
+
SELECT pg_catalog.set_config('search_path', '', false);
|
37
|
+
SET check_function_bodies = false;
|
38
|
+
SET xmloption = content;
|
39
|
+
SET client_min_messages = warning;
|
40
|
+
SET row_security = off;
|
41
|
+
|
42
|
+
--
|
43
|
+
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
|
44
|
+
--
|
45
|
+
|
46
|
+
CREATE SCHEMA public;
|
47
|
+
|
48
|
+
|
49
|
+
ALTER SCHEMA public OWNER TO postgres;
|
50
|
+
|
51
|
+
--
|
52
|
+
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
|
53
|
+
--
|
54
|
+
|
55
|
+
COMMENT ON SCHEMA public IS 'standard public schema';
|
56
|
+
|
57
|
+
|
58
|
+
--
|
59
|
+
-- Name: dtmint32hash(bytea); Type: FUNCTION; Schema: public; Owner: smevql
|
60
|
+
--
|
61
|
+
|
62
|
+
CREATE FUNCTION public.dtmint32hash(bytea) RETURNS integer
|
63
|
+
LANGUAGE sql IMMUTABLE STRICT LEAKPROOF
|
64
|
+
AS $_$select get_byte($1, 0)+(get_byte($1, 1)<<8)+(get_byte($1, 2)<<16)+(get_byte($1, 3)<<24)$_$;
|
65
|
+
|
66
|
+
|
67
|
+
ALTER FUNCTION public.dtmint32hash(bytea) OWNER TO smevql;
|
68
|
+
|
69
|
+
SET default_tablespace = '';
|
70
|
+
|
71
|
+
SET default_table_access_method = heap;
|
72
|
+
|
73
|
+
--
|
74
|
+
-- Name: apn; Type: TABLE; Schema: public; Owner: postgres
|
75
|
+
--
|
76
|
+
|
77
|
+
CREATE TABLE public.apn (
|
78
|
+
personlastname character varying,
|
79
|
+
personfirstname character varying,
|
80
|
+
personmiddlename character varying,
|
81
|
+
norm_personlastname character varying,
|
82
|
+
norm_personfirstname character varying,
|
83
|
+
norm_personmiddlename character varying,
|
84
|
+
personbirthdate date,
|
85
|
+
personbirthplace character varying,
|
86
|
+
unicnumber character varying NOT NULL,
|
87
|
+
decreedate date,
|
88
|
+
decreedeprivation bigint,
|
89
|
+
decreelaworgan character varying,
|
90
|
+
decreelawdate date,
|
91
|
+
department character varying,
|
92
|
+
laststagecode bigint,
|
93
|
+
laststagename character varying,
|
94
|
+
laststagedate date
|
95
|
+
);
|
96
|
+
|
97
|
+
|
98
|
+
ALTER TABLE public.apn OWNER TO postgres;
|
99
|
+
|
100
|
+
--
|
101
|
+
-- Name: driverlicense; Type: TABLE; Schema: public; Owner: postgres
|
102
|
+
--
|
103
|
+
|
104
|
+
CREATE TABLE public.driverlicense (
|
105
|
+
driverlicensetypeid bigint,
|
106
|
+
driverlicensetype character varying,
|
107
|
+
driverlicensesernum character varying,
|
108
|
+
norm_driverlicensesernum character varying,
|
109
|
+
driverlicenseissuedate date,
|
110
|
+
driverlicenseduedate date,
|
111
|
+
driverlicenseissuer character varying,
|
112
|
+
driverlicenseissuerregion character varying,
|
113
|
+
driverlicensecategories character varying,
|
114
|
+
driverlicenseexperience character varying,
|
115
|
+
driverlicensespecmark character varying,
|
116
|
+
driverlicensephoto character varying,
|
117
|
+
driverdoctypeid character varying,
|
118
|
+
driverdoctype character varying,
|
119
|
+
driverdocsernum character varying,
|
120
|
+
driverdocissuedate date,
|
121
|
+
driverlastname character varying,
|
122
|
+
driverfirstname character varying,
|
123
|
+
drivermiddlename character varying,
|
124
|
+
driverbirthdate date,
|
125
|
+
driverbirthregionid character varying,
|
126
|
+
driverbirthregion character varying,
|
127
|
+
driverbirthplace character varying,
|
128
|
+
driverbasedoctypeid bigint,
|
129
|
+
driverbasedoctype character varying,
|
130
|
+
driverbasesernum character varying,
|
131
|
+
driverbaseissuer character varying,
|
132
|
+
driverbaseissuedate date,
|
133
|
+
driverbaseduedate date,
|
134
|
+
driverlicensestatus bigint,
|
135
|
+
driverlicenseoperationcode bigint,
|
136
|
+
driverlicenseoperationname character varying,
|
137
|
+
driverlicenseid bigint NOT NULL,
|
138
|
+
driverlicenseissuercode character varying,
|
139
|
+
driveraddressregion character varying,
|
140
|
+
driverlicensecategoriesfull character varying,
|
141
|
+
driverlicenseqr character varying
|
142
|
+
);
|
143
|
+
|
144
|
+
|
145
|
+
ALTER TABLE public.driverlicense OWNER TO postgres;
|
146
|
+
|
147
|
+
--
|
148
|
+
-- Name: driverlicense_new; Type: TABLE; Schema: public; Owner: postgres
|
149
|
+
--
|
150
|
+
|
151
|
+
CREATE TABLE public.driverlicense_new (
|
152
|
+
driverlicensetypeid bigint,
|
153
|
+
driverlicensetype character varying,
|
154
|
+
driverlicensesernum character varying,
|
155
|
+
norm_driverlicensesernum character varying,
|
156
|
+
driverlicenseissuedate date,
|
157
|
+
driverlicenseduedate date,
|
158
|
+
driverlicenseissuer character varying,
|
159
|
+
driverlicenseissuerregion character varying,
|
160
|
+
driverlicensecategories character varying,
|
161
|
+
driverlicenseexperience character varying,
|
162
|
+
driverlicensespecmark character varying,
|
163
|
+
driverlicensephoto character varying,
|
164
|
+
driverdoctypeid character varying,
|
165
|
+
driverdoctype character varying,
|
166
|
+
driverdocsernum character varying,
|
167
|
+
driverdocissuedate date,
|
168
|
+
driverlastname character varying,
|
169
|
+
driverfirstname character varying,
|
170
|
+
drivermiddlename character varying,
|
171
|
+
driverbirthdate date,
|
172
|
+
driverbirthregionid character varying,
|
173
|
+
driverbirthregion character varying,
|
174
|
+
driverbirthplace character varying,
|
175
|
+
driverbasedoctypeid bigint,
|
176
|
+
driverbasedoctype character varying,
|
177
|
+
driverbasesernum character varying,
|
178
|
+
driverbaseissuer character varying,
|
179
|
+
driverbaseissuedate date,
|
180
|
+
driverbaseduedate date,
|
181
|
+
driverlicensestatus bigint,
|
182
|
+
driverlicenseoperationcode bigint,
|
183
|
+
driverlicenseoperationname character varying,
|
184
|
+
driverlicenseid bigint NOT NULL,
|
185
|
+
driverlicenseissuercode character varying,
|
186
|
+
driveraddressregion character varying,
|
187
|
+
driverlicensecategoriesfull character varying,
|
188
|
+
driverlicenseqr character varying
|
189
|
+
);
|
190
|
+
|
191
|
+
|
192
|
+
ALTER TABLE public.driverlicense_new OWNER TO postgres;
|
193
|
+
|
194
|
+
--
|
195
|
+
-- Data for Name: apn; Type: TABLE DATA; Schema: public; Owner: postgres
|
196
|
+
--
|
197
|
+
|
198
|
+
COPY public.apn (personlastname, personfirstname, personmiddlename, norm_personlastname, norm_personfirstname, norm_personmiddlename, personbirthdate, personbirthplace, unicnumber, decreedate, decreedeprivation, decreelaworgan, decreelawdate, department, laststagecode, laststagename, laststagedate) FROM stdin;
|
199
|
+
\.
|
200
|
+
|
201
|
+
|
202
|
+
--
|
203
|
+
-- Data for Name: driverlicense; Type: TABLE DATA; Schema: public; Owner: postgres
|
204
|
+
--
|
205
|
+
|
206
|
+
COPY public.driverlicense (driverlicensetypeid, driverlicensetype, driverlicensesernum, norm_driverlicensesernum, driverlicenseissuedate, driverlicenseduedate, driverlicenseissuer, driverlicenseissuerregion, driverlicensecategories, driverlicenseexperience, driverlicensespecmark, driverlicensephoto, driverdoctypeid, driverdoctype, driverdocsernum, driverdocissuedate, driverlastname, driverfirstname, drivermiddlename, driverbirthdate, driverbirthregionid, driverbirthregion, driverbirthplace, driverbasedoctypeid, driverbasedoctype, driverbasesernum, driverbaseissuer, driverbaseissuedate, driverbaseduedate, driverlicensestatus, driverlicenseoperationcode, driverlicenseoperationname, driverlicenseid, driverlicenseissuercode, driveraddressregion, driverlicensecategoriesfull, driverlicenseqr) FROM stdin;
|
207
|
+
4 B 32662 35336 \N \N 44261 48726 32627 40788 30656 35460 40879 34530 43350 \N Смирнов Иван Иванович \N 9484 9196 9981 9285 9678 9308 9804 \N \N 9045 9373 9632 14 9924 9503 9097 9527\r
|
208
|
+
5 A 40394 44247 \N \N 34063 44357 48029 37386 35262 34391 47193 34787 32237 \N Петров Александр Александрович \N 9194 9650 9508 9942 9166 9157 9336 \N \N 9178 9937 9438 4 9714 9413 9106 9585\r
|
209
|
+
1 A 33592 49667 \N \N 34703 47154 41051 47236 48240 40666 47886 36700 44919 \N Фёдоров Михаил Александрович \N 9007 9688 9084 9547 9539 9876 9584 \N \N 9976 9143 9302 10 9707 9029 9887 9245\r
|
210
|
+
2 B 37021 37557 \N \N 35267 38135 33907 31819 32383 32062 40067 45956 45417 \N Богданов Денис Андреевич \N 9299 9592 9424 9433 9812 9889 9557 \N \N 9180 9657 9760 20 9715 9423 9904 9936\r
|
211
|
+
2 B 41692 30578 \N \N 30541 40497 36928 34481 38586 30600 46313 49630 31381 \N Белов Евгений Витальевич \N 9844 9049 9330 9052 9770 9640 9672 \N \N 9898 9667 9295 19 9321 9926 9492 9437\r
|
212
|
+
4 A 39303 38066 \N \N 32203 44209 47451 49260 36593 39282 41299 46188 49000 \N Голубев Камиль Гадиятулаевич \N 9676 9358 9679 9281 9291 9636 9985 \N \N 9812 9787 9111 39 9313 9360 9243 9923
|
213
|
+
5 A 38080 30893 \N \N 35264 39076 46607 31430 32989 30502 44350 34403 41518 \N Воробьёв Василий Вячеславович \N 9347 9220 9921 9908 9847 9461 9572 \N \N 9975 9097 9453 11 9315 9222 9249 9350\r
|
214
|
+
2 A 30663 40423 \N \N 45874 49247 31668 32622 32364 49951 49727 44777 36434 \N Попов Владимир Владимирович \N 9563 9684 9560 9316 9942 9434 9095 \N \N 9653 9693 9471 36 9787 9739 9546 9538\r
|
215
|
+
3 A 47850 41220 \N \N 31438 45520 45062 39925 47256 38069 40824 34952 44989 \N Лебедев Ильнар Мансурович \N 9065 9408 9962 9110 9314 9600 9353 \N \N 9593 9074 9279 1 9767 9750 9261 9834\r
|
216
|
+
1 A 41559 33479 \N \N 35166 46645 48648 47556 46967 42661 30908 33909 31017 \N Соколов Александр Викторович \N 9489 9814 9097 9759 9087 9665 9173 \N \N 9867 9167 9953 37 9017 9425 9946 9720\r
|
217
|
+
4 A 30101 49502 \N \N 43233 35838 39282 44456 42490 34504 36989 42232 43540 \N Козлов Кирилл Александрович \N 9940 9293 9415 9250 9145 9099 9957 \N \N 9757 9062 9103 2 9745 9683 9635 9554\r
|
218
|
+
3 C 34028 48550 \N \N 47215 30616 32399 38732 31737 31835 45174 41982 36091 \N Кузнецов Валерий Евгеньевич \N 9740 9324 9797 9732 9795 9308 9934 \N \N 9941 9462 9570 29 9419 9697 9821 9851\r
|
219
|
+
1 A 33326 48544 \N \N 43155 39219 40338 45451 46554 46035 49409 30710 40314 \N Иванов Петр Петрович \N 9279 9431 9086 9956 9076 9624 9299 \N \N 9532 9245 9122 38 9654 9638 9276 9006\r
|
220
|
+
5 A 43749 37431 \N \N 36135 38292 41915 35949 33008 47121 33838 31724 34843 \N Морозов Дмитрий Александрович \N 9426 9603 9372 9072 9389 9065 9731 \N \N 9892 9958 9420 7 9476 9152 9768 9656\r
|
221
|
+
2 A 32537 47132 \N \N 34843 45802 40168 48379 32442 48267 30145 37842 39505 \N Виноградов Павел Викторович \N 9612 9767 9911 9577 9348 9095 9044 \N \N 9652 9973 9091 5 9133 9270 9298 9655\r
|
222
|
+
1 C 46680 30305 \N \N 39796 35826 38849 46806 30651 34581 45212 30432 33118 \N Беляев Алексей Николаевич \N 9960 9604 9043 9854 9470 9807 9729 \N \N 9348 9293 9180 32 9881 9133 9429 9345\r
|
223
|
+
2 B 30454 45781 \N \N 46798 39543 33819 42643 45076 38441 48697 41322 48927 \N Васильев Сергей Викторович \N 9547 9759 9495 9474 9123 9187 9988 \N \N 9096 9799 9231 25 9597 9857 9394 9957\r
|
224
|
+
1 C 33179 31492 \N \N 38366 40906 44907 49044 35945 41825 30210 45992 38756 \N Соловьёв Леонид Иванович \N 9296 9397 9621 9469 9453 9414 9339 \N \N 9855 9917 9421 26 9976 9154 9502 9866\r
|
225
|
+
1 C 42169 49526 \N \N 34753 44902 33918 39376 43744 31151 37193 47518 43957 \N Михайлов Александр Георгиевич \N 9864 9278 9420 9970 9717 9535 9167 \N \N 9294 9003 9849 34 9798 9536 9242 9168\r
|
226
|
+
2 C 44372 40945 \N \N 32443 34934 44106 39005 30392 38738 44331 33681 37819 \N Семёнов Тимур Маратович \N 9541 9442 9288 9677 9080 9605 9447 \N \N 9762 9954 9486 28 9688 9778 9632 9674\r
|
227
|
+
4 B 42336 49020 \N \N 45275 33979 43352 49691 47660 42356 37954 37598 42647 \N Тарасов Илья Михайлович \N 9519 9621 9298 9571 9014 9002 9382 \N \N 9345 9595 9339 21 9175 9139 9158 9319\r
|
228
|
+
2 B 37599 45223 \N \N 40100 37531 36153 43895 48651 40730 45967 40089 46655 \N Зайцев Елизавета Григорьевна \N 9450 9832 9354 9589 9069 9993 9214 \N \N 9703 9607 9980 24 9453 9251 9281 9306\r
|
229
|
+
1 B 35317 46756 \N \N 39614 33621 32434 32457 37554 41064 46467 47084 31542 \N Павлов Вячеслав Александрович \N 9988 9426 9749 9478 9615 9038 9793 \N \N 9422 9001 9640 15 9951 9502 9882 9315\r
|
230
|
+
2 C 35107 39339 \N \N 42974 44047 36268 38479 37347 37680 33099 40084 46868 \N Новиков Олег Александрович \N 9544 9119 9148 9108 9188 9097 9994 \N \N 9684 9562 9976 27 9396 9699 9093 9520\r
|
231
|
+
4 A 31614 40116 \N \N 46690 39885 32469 43751 34759 45648 41614 38868 43866 \N Волков Юлия Олеговна \N 9635 9214 9479 9103 9763 9118 9504 \N \N 9314 9212 9631 8 9122 9088 9145 9874\r
|
232
|
+
5 B 30759 49707 \N \N 43504 49493 44018 48965 40481 45554 35884 45193 40204 \N Кудрявцев Светлана Валерьевна \N 9118 9426 9685 9151 9268 9311 9243 \N \N 9074 9151 9367 17 9469 9424 9402 9991\r
|
233
|
+
4 B 47250 44522 \N \N 37435 31271 47627 36037 40230 35079 43076 46020 45352 \N Баранов Роман Сергеевич \N 9908 9666 9487 9578 9745 9967 9553 \N \N 9231 9216 9758 13 9552 9813 9072 9752\r
|
234
|
+
1 A 39917 30343 \N \N 45400 43064 41106 42632 48333 32216 48814 40013 39843 \N Ковалёв Филипп Арсенович \N 9193 9223 9215 9322 9802 9549 9613 \N \N 9742 9810 9617 12 9953 9455 9538 9581\r
|
235
|
+
4 C 45173 34627 \N \N 36823 40711 34258 37334 36470 30436 40908 42419 36103 \N Макаров Всеволод Дмитриевич \N 9832 9083 9159 9687 9374 9076 9736 \N \N 9300 9783 9494 33 9376 9006 9880 9758\r
|
236
|
+
2 B 31911 46817 \N \N 44135 33942 37246 49326 36748 46344 30450 30903 48074 \N Андреев Мария Анатольевна \N 9237 9298 9567 9534 9069 9243 9602 \N \N 9440 9945 9625 16 9409 9332 9894 9221\r
|
237
|
+
3 B 35180 49968 \N \N 39263 33510 46216 32170 39353 47572 40261 41034 42802 \N Киселёв Евгений Александрович \N 9044 9813 9881 9328 9221 9939 9720 \N \N 9183 9265 9150 22 9784 9192 9622 9284\r
|
238
|
+
2 A 37015 38968 \N \N 38545 49422 49170 46406 40350 40978 45942 35251 44989 \N Титов Николай Викторович \N 9892 9253 9959 9421 9757 9800 9342 \N \N 9600 9056 9940 9 9436 9500 9296 9263\r
|
239
|
+
2 A 37891 49686 \N \N 45030 48543 42333 40415 44934 40121 48777 35466 43760 \N Куликов Георгий Евгеньевич \N 9494 9592 9175 9265 9334 9053 9838 \N \N 9155 9564 9603 3 9304 9597 9820 9556\r
|
240
|
+
1 A 42486 37384 \N \N 40177 41328 39929 41273 45818 33612 46509 45720 49725 \N Алексеев Дмитрий Владимирович \N 9830 9933 9029 9067 9881 9297 9811 \N \N 9591 9197 9616 6 9844 9765 9031 9199\r
|
241
|
+
4 C 43290 46855 \N \N 33728 33881 35389 31875 47865 44560 33564 44218 32614 \N Комаров Евгений Александрович \N 9312 9443 9550 9657 9679 9761 9150 \N \N 9118 9303 9932 31 9082 9916 9715 9482\r
|
242
|
+
3 B 32187 33698 \N \N 36513 31836 41753 47511 34752 40571 38507 41635 32441 \N Гусев Александр Сергеевич \N 9211 9334 9952 9756 9881 9934 9465 \N \N 9026 9237 9399 23 9911 9102 9403 9919\r
|
243
|
+
3 B 45973 32756 \N \N 49754 34948 47887 40130 45544 34825 43672 40673 30724 \N Кузьмин Денис Алексеевич \N 9740 9126 9837 9523 9603 9652 9524 \N \N 9771 9793 9738 18 9442 9691 9074 9233\r
|
244
|
+
4 C 47023 40600 \N \N 41989 43303 48229 38314 45012 32411 31609 35249 43515 \N Орлов Олег Николаевич \N 9625 9045 9987 9843 9101 9083 9403 \N \N 9768 9932 9360 35 9822 9758 9887 9475\r
|
245
|
+
5 C 32307 31036 \N \N 47898 37020 43695 41831 36560 40674 39528 31263 31560 \N Ильин Иван Сергеевич \N 9863 9000 9773 9011 9245 9351 9772 \N \N 9848 9957 9481 30 9502 9052 9570 9251\r
|
246
|
+
\.
|
247
|
+
|
248
|
+
|
249
|
+
--
|
250
|
+
-- Data for Name: driverlicense_new; Type: TABLE DATA; Schema: public; Owner: postgres
|
251
|
+
--
|
252
|
+
|
253
|
+
COPY public.driverlicense_new (driverlicensetypeid, driverlicensetype, driverlicensesernum, norm_driverlicensesernum, driverlicenseissuedate, driverlicenseduedate, driverlicenseissuer, driverlicenseissuerregion, driverlicensecategories, driverlicenseexperience, driverlicensespecmark, driverlicensephoto, driverdoctypeid, driverdoctype, driverdocsernum, driverdocissuedate, driverlastname, driverfirstname, drivermiddlename, driverbirthdate, driverbirthregionid, driverbirthregion, driverbirthplace, driverbasedoctypeid, driverbasedoctype, driverbasesernum, driverbaseissuer, driverbaseissuedate, driverbaseduedate, driverlicensestatus, driverlicenseoperationcode, driverlicenseoperationname, driverlicenseid, driverlicenseissuercode, driveraddressregion, driverlicensecategoriesfull, driverlicenseqr) FROM stdin;
|
254
|
+
\N \N abc 3 \N \N \N \N \N \N \N \N \N \N \N \N Евгеничук Евгений Олегович \N \N \N \N 1 \N \N \N \N \N \N \N \N 333 \N \N \N \N
|
255
|
+
\.
|
256
|
+
|
257
|
+
|
258
|
+
--
|
259
|
+
-- Name: apn apn_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
260
|
+
--
|
261
|
+
|
262
|
+
ALTER TABLE ONLY public.apn
|
263
|
+
ADD CONSTRAINT apn_pkey PRIMARY KEY (unicnumber);
|
264
|
+
|
265
|
+
|
266
|
+
--
|
267
|
+
-- Name: driverlicense_new driverlicense_new_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
268
|
+
--
|
269
|
+
|
270
|
+
ALTER TABLE ONLY public.driverlicense_new
|
271
|
+
ADD CONSTRAINT driverlicense_new_pkey PRIMARY KEY (driverlicenseid);
|
272
|
+
|
273
|
+
|
274
|
+
--
|
275
|
+
-- Name: driverlicense driverlicense_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
276
|
+
--
|
277
|
+
|
278
|
+
ALTER TABLE ONLY public.driverlicense
|
279
|
+
ADD CONSTRAINT driverlicense_pkey PRIMARY KEY (driverlicenseid);
|
280
|
+
|
281
|
+
|
282
|
+
--
|
283
|
+
-- PostgreSQL database dump complete
|
284
|
+
--
|
285
|
+
|
@@ -26,10 +26,20 @@ module Qravan
|
|
26
26
|
@resource_data["attributes"].join(","),
|
27
27
|
:from,
|
28
28
|
cargo.models[@resource]["extract"]["source"]["table"],
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
where
|
30
|
+
].flatten.join(" ")
|
31
|
+
end
|
32
|
+
|
33
|
+
def where
|
34
|
+
if @resource_data["conditions"]
|
35
|
+
[
|
36
|
+
:where,
|
37
|
+
@resource_data["conditions"].map { |k, v| "#{k}='#{v}'" }
|
38
|
+
.join(" and ")
|
39
|
+
]
|
40
|
+
else
|
41
|
+
[""]
|
42
|
+
end
|
33
43
|
end
|
34
44
|
end
|
35
45
|
end
|
data/lib/qravan/version.rb
CHANGED
data/models/current/model.yaml
CHANGED
@@ -31,6 +31,35 @@ primary_key: &pk
|
|
31
31
|
base_model: &base_model
|
32
32
|
default_fields: &default_fields
|
33
33
|
resources:
|
34
|
+
# супер Водитель ---------------------
|
35
|
+
- super_driver: *base_model
|
36
|
+
name: Водитель
|
37
|
+
fields:
|
38
|
+
<<: *default_fields
|
39
|
+
Lastname: *ds
|
40
|
+
Firstname: *ds
|
41
|
+
Middlename: *ds
|
42
|
+
BirthDate: *ds
|
43
|
+
BirthRegionId: *ds
|
44
|
+
BirthRegion: *ds
|
45
|
+
BirthPlace: *ds
|
46
|
+
connections:
|
47
|
+
has_many:
|
48
|
+
- driver_license:
|
49
|
+
primary_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
50
|
+
foreign_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
51
|
+
- reason_document:
|
52
|
+
primary_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
53
|
+
foreign_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
54
|
+
- restriction:
|
55
|
+
primary_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
56
|
+
foreign_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
57
|
+
extract:
|
58
|
+
source:
|
59
|
+
name: prostore
|
60
|
+
table: smevql1.driverlicenseql3
|
61
|
+
# name: postgres
|
62
|
+
# table: DriverLicense
|
34
63
|
# Водитель ---------------------
|
35
64
|
- driver: *base_model
|
36
65
|
name: Водитель
|
@@ -58,6 +87,8 @@ resources:
|
|
58
87
|
source:
|
59
88
|
name: prostore
|
60
89
|
table: smevql1.driverlicenseql3
|
90
|
+
# name: postgres
|
91
|
+
# table: DriverLicense
|
61
92
|
# Водительское удостоверение ----------------------
|
62
93
|
- driver_license: *base_model
|
63
94
|
name: Водительское удостоверение
|
@@ -123,7 +154,7 @@ resources:
|
|
123
154
|
IssueDate: *ds
|
124
155
|
extract:
|
125
156
|
source:
|
126
|
-
name:
|
157
|
+
name: postgres
|
127
158
|
table: DriverLicense
|
128
159
|
|
129
160
|
# Ограничение
|
@@ -1,4 +1,33 @@
|
|
1
1
|
resources:
|
2
|
+
# супер Водитель ---------------------
|
3
|
+
- super_driver: *base_model
|
4
|
+
name: Водитель
|
5
|
+
fields:
|
6
|
+
<<: *default_fields
|
7
|
+
Lastname: *ds
|
8
|
+
Firstname: *ds
|
9
|
+
Middlename: *ds
|
10
|
+
BirthDate: *ds
|
11
|
+
BirthRegionId: *ds
|
12
|
+
BirthRegion: *ds
|
13
|
+
BirthPlace: *ds
|
14
|
+
connections:
|
15
|
+
has_many:
|
16
|
+
- driver_license:
|
17
|
+
primary_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
18
|
+
foreign_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
19
|
+
- reason_document:
|
20
|
+
primary_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
21
|
+
foreign_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
22
|
+
- restriction:
|
23
|
+
primary_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
24
|
+
foreign_key: [ LastName, FirstName, MiddleName, BirthDay ]
|
25
|
+
extract:
|
26
|
+
source:
|
27
|
+
name: prostore
|
28
|
+
table: smevql1.driverlicenseql3
|
29
|
+
# name: postgres
|
30
|
+
# table: DriverLicense
|
2
31
|
# Водитель ---------------------
|
3
32
|
- driver: *base_model
|
4
33
|
name: Водитель
|
@@ -26,6 +55,8 @@ resources:
|
|
26
55
|
source:
|
27
56
|
name: prostore
|
28
57
|
table: smevql1.driverlicenseql3
|
58
|
+
# name: postgres
|
59
|
+
# table: DriverLicense
|
29
60
|
# Водительское удостоверение ----------------------
|
30
61
|
- driver_license: *base_model
|
31
62
|
name: Водительское удостоверение
|
@@ -91,7 +122,7 @@ resources:
|
|
91
122
|
IssueDate: *ds
|
92
123
|
extract:
|
93
124
|
source:
|
94
|
-
name:
|
125
|
+
name: postgres
|
95
126
|
table: DriverLicense
|
96
127
|
|
97
128
|
# Ограничение
|
data/qravan.gemspec
CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = "Qravan simple API server for data requests."
|
12
12
|
spec.homepage = "https://qravan.ru"
|
13
13
|
spec.required_ruby_version = ">= 3.0.2"
|
14
|
+
spec.licenses = ["Nonstandard"]
|
14
15
|
|
15
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
17
|
spec.metadata["source_code_uri"] = "https://github.com/capaas/qravan"
|
@@ -27,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
27
28
|
spec.extensions = ["ext/qravan/extconf.rb"]
|
28
29
|
|
29
30
|
# Uncomment to register a new dependency of your gem
|
30
|
-
spec.add_dependency "rack", "~> 3.0.
|
31
|
+
spec.add_dependency "rack", "~> 3.0.4.1"
|
31
32
|
spec.add_dependency "rack-unreloader", ">= 1.8"
|
32
33
|
|
33
34
|
spec.add_dependency "async", "~> 1.30.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qravan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- apanasenkov@capaa.ru
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.
|
19
|
+
version: 3.0.4.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.
|
26
|
+
version: 3.0.4.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack-unreloader
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,6 +231,8 @@ files:
|
|
231
231
|
- bin/console
|
232
232
|
- bin/setup
|
233
233
|
- config.ru
|
234
|
+
- examples/demo/postgres_prostore_vehicles/smevql_postgres_localhost.dump
|
235
|
+
- examples/demo/postgres_vehicles/smevql_postgres_localhost.dump
|
234
236
|
- examples/queries.md
|
235
237
|
- exe/qravan
|
236
238
|
- ext/qravan/extconf.rb
|
@@ -269,7 +271,8 @@ files:
|
|
269
271
|
- sources/prostore/1.0/source.yaml
|
270
272
|
- sources/prostore/current
|
271
273
|
homepage: https://qravan.ru
|
272
|
-
licenses:
|
274
|
+
licenses:
|
275
|
+
- Nonstandard
|
273
276
|
metadata:
|
274
277
|
homepage_uri: https://qravan.ru
|
275
278
|
source_code_uri: https://github.com/capaas/qravan
|