@raphiniert/ra-data-postgrest 2.0.0 → 2.2.0

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/CHANGELOG.md CHANGED
@@ -1,224 +1,236 @@
1
- # Change Log
2
-
3
- Find all notable changes of this project in this file.
4
-
5
- ## v2.0.0 - 2023-12-29
6
- ### Improvements
7
- - updated dependencies
8
-
9
- ### Fixes
10
- - [#113](https://github.com/raphiniert-com/ra-data-postgrest/pull/113) remove {} value wrapping for cs/cd @[ruslantalpa](https://github.com/ruslantalpa)
11
-
12
- ### Breaking changes
13
- - the fix in this version might break old versions, as the {} are removed. Thus, one needs to manually add the {} for cs/cd.
14
-
15
-
16
- ## v2.0.0-alpha.4 - 2023-10-23
17
- ### Improvements
18
- - updated dependencies
19
-
20
- ### New feature
21
- - [#100](https://github.com/raphiniert-com/ra-data-postgrest/pull/100) support "meta.columns" on all code paths (useful when the user does not have permissions on all the columns in which case doing select=* gives permissions errors) - @[ruslantalpa](https://github.com/ruslantalpa)
22
-
23
- ### Fixes
24
- - [#50](https://github.com/raphiniert-com/ra-data-postgrest/issues/50) and [#88](https://github.com/raphiniert-com/ra-data-postgrest/issues/88) solved by [#100](https://github.com/raphiniert-com/ra-data-postgrest/pull/100) including other fixes - @[ruslantalpa](https://github.com/ruslantalpa)
25
-
26
-
27
- ## v2.0.0-alpha.3 - 2023-06-16
28
- ### Improvements
29
- - updated dependencies
30
-
31
- ### New feature
32
- - [#82](https://github.com/raphiniert-com/ra-data-postgrest/pull/82), add logical operator filter parsing - @[jordiyapz](https://github.com/jordiyapz)
33
-
34
- ### Fixes
35
- - [#81](https://github.com/raphiniert-com/ra-data-postgrest/pull/81), use {} with cs and cd operators url - @[YannBeauxis](https://github.com/YannBeauxis)
36
-
37
- ### Breaking changes
38
- - Changed from from regular parameters to instantiate the dataProvider to a configuration interface/class. Thus, in future initalize the dataProvider by creating a structure which implements the interface:
39
-
40
- ```jsx
41
- import { fetchUtils } from 'react-admin';
42
- import postgrestRestProvider,
43
- { IDataProviderConfig,
44
- defaultPrimaryKeys,
45
- defaultSchema } from '@raphiniert/ra-data-postgrest';
46
-
47
- const config: IDataProviderConfig = {
48
- apiUrl: 'http://path.to.my.api/',
49
- httpClient: fetchUtils.fetchJson,
50
- defaultListOp: 'eq',
51
- primaryKeys: defaultPrimaryKeys,
52
- schema: defaultSchema
53
- }
54
-
55
- dp = postgrestRestProvider(config);
56
- ```
57
-
58
- ## v2.0.0-alpha.2 - 2023-04-24
59
- ### Improvements
60
- - updated dependencies
61
-
62
- ### New feature
63
- - [#49](https://github.com/raphiniert-com/ra-data-postgrest/issues/49), custom schema name can be used
64
-
65
- ## v2.0.0-alpha.1 - 2023-04-09
66
- ### Improvements
67
- - updated dependencies
68
- - updated `urlBuilder` and integrated URL encoding
69
-
70
- ### New feature
71
- - [#48](https://github.com/raphiniert-com/ra-data-postgrest/issues/48) solved by pull request [#55](https://github.com/raphiniert-com/ra-data-postgrest/pull/55), the create method should return the data returned by postgrest and not the posted data - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
72
- - [#39](https://github.com/raphiniert-com/ra-data-postgrest/pull/39), allow passing extra headers via meta for react-admin hooks - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
73
- - [#41](https://github.com/raphiniert-com/ra-data-postgrest/pull/41), allow columns filtering for getList and getManyReference - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
74
- - added support of [#41](https://github.com/raphiniert-com/ra-data-postgrest/pull/41) for other functions, but `create` and `updateMany`
75
- - [#38](https://github.com/raphiniert-com/ra-data-postgrest/pull/38), Let the sort param in getList be optional - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
76
-
77
-
78
- ## v1.2.1 - 2023-04-07
79
- - small fix in condition
80
- - fixed package name
81
-
82
- ## v2.0.0-alpha.0 - 2022-11-23
83
-
84
- - [#42](https://github.com/raphiniert-com/ra-data-postgrest/issues/42), started adding some unit tests - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
85
- - dropped authProvider
86
- - code cleanup & restructuring
87
- - minor bugfixes - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
88
- - added some notes to README.md
89
-
90
- ### Breaking changes
91
-
92
- - dropped authProvider as this should rather be an own package in case of a generic piece of software or application specific.
93
-
94
- ## v1.2.0 - 2022-08-23
95
-
96
- - [#33](https://github.com/raphiniert-com/ra-data-postgrest/pull/33), adding dependabot - @[promitheus7](https://github.com/promitheus7)
97
- - [#30](https://github.com/raphiniert-com/ra-data-postgrest/pull/30) and [#33](https://github.com/raphiniert-com/ra-data-postgrest/pull/33), updated dependency to compatible starting from `ra-core` 4.1.x - @[corrideat](https://github.com/corrideat), @[promitheus7](https://github.com/promitheus7)
98
-
99
- ## v1.1.9 - 2022-08-23
100
-
101
- - [#30](https://github.com/raphiniert-com/ra-data-postgrest/pull/30), updated ts and modified code, such that some package dependencies became unrequired - @[corrideat](https://github.com/corrideat)
102
-
103
- ## v1.1.8 - 2022-01-07
104
-
105
- - required re-release as I missed to transpile all and upload the features of 1.1.7 to npm.
106
-
107
- ## v1.1.7 - 2022-01-07
108
-
109
- ### Fixes
110
-
111
- - fixed bad behaivor with compound keys while using field named `id` [issue #27](https://github.com/raphiniert-com/ra-data-postgrest/issues/27) and [issue #19](https://github.com/raphiniert-com/ra-data-postgrest/pull/19) - @[kenfehling](https://github.com/kenfehling)
112
-
113
- ### New feature
114
-
115
- - [#26](https://github.com/raphiniert-com/ra-data-postgrest/pull/26), added rpc filter support, which is explained [here](https://github.com/raphiniert-com/ra-data-postgrest#special-filter-feature-rpc-functions) - @[TheRealAstroboy](https://github.com/TheRealAstroboy)
116
-
117
- ## v1.1.6 - 2021-01-16
118
-
119
- ### Fixes
120
-
121
- - [#24](https://github.com/raphiniert-com/ra-data-postgrest/pull/24), fixed eq. prefix for non-compound keys [issue #23](https://github.com/raphiniert-com/ra-data-postgrest/issues/23) - @[andymed-jlp](https://github.com/andymed-jlp)
122
-
123
- ## v1.1.5 - 2021-01-16
124
-
125
- ### Fixes
126
-
127
- - fixed query string generation of rpc endpoints [issue #22](https://github.com/raphiniert-com/ra-data-postgrest/issues/22)
128
-
129
- ### Breaking changes
130
-
131
- - Support was dropped for generating the query string given many ids in case of an rpc endpoint. If your application has some psql functions which parse the standard input, I recommend to rework your db design. If this change causes strong damage to your application, please contact me in order to find a proper generic solution. Query strings of single rpc calls now drop the operator (`eq.`) and are generated properly.
132
-
133
- ## v1.1.4 - 2021-01-16
134
-
135
- - deployment error
136
-
137
- ## v1.1.3 - 2020-11-30
138
-
139
- ### Fixes
140
-
141
- - [#20](https://github.com/raphiniert-com/ra-data-postgrest/pull/20), fixed small bug in update - @[mkkane](https://github.com/mkkane)
142
- - removed console log
143
-
144
- ## v1.1.2 - 2020-10-05
145
-
146
- ### Fixes
147
-
148
- - fixed the last fix of getMany and getManyReferecnce for compound keys :)
149
-
150
- ## v1.1.1 - 2020-09-28
151
-
152
- ### Fixes
153
-
154
- - fixed getMany and getManyReferecnce for compound keys
155
-
156
- ## v1.1.0 - 2020-09-16
157
-
158
- ### Fixes
159
-
160
- - removed requirement to define order key in react admin, when using compound keys: default was `id`, now it's the compound key
161
-
162
- ### Breaking changes
163
-
164
- - refactored compound primary keys:
165
- For single custom keys wrap an array as follows:
166
- ```jsx
167
- const dataProvider = postgrestRestProvider(
168
- API_URL,
169
- fetchUtils.fetchJson,
170
- 'eq',
171
- new Map([
172
- ['some_table', ['custom_id']], // <- instead of ['some_table','custom_id']
173
- ['another_table', ['first_column', 'second_column']],
174
- ])
175
- );
176
- ```
177
-
178
- ## v1.0.7 - 2020-08-23
179
-
180
- ### New feature
181
-
182
- - [#14](https://github.com/raphiniert-com/ra-data-postgrest/pull/14), added compound primary keys (see [README.md](https://github.com/raphiniert-com/ra-data-postgrest/blob/master/README.md#compound-primary-keys)) - @[programmarchy](https://github.com/programmarchy)
183
-
184
- ### Maintenance
185
-
186
- - `import React from 'react';` -> `import * as React from 'react';`
187
- - Some minor code cleanup
188
-
189
- ## v1.0.6 - 2020-06-15
190
-
191
- ### Fixes
192
-
193
- - Fixed wrong support statement concerning [postgrest starter kit](https://github.com/subzerocloud/postgrest-starter-kit) in readme
194
-
195
- ## v1.0.5 - 2020-06-15
196
-
197
- ### Fixes
198
-
199
- - [#13](https://github.com/raphiniert-com/ra-data-postgrest/pull/13), Remove console.log - @[jpagex](https://github.com/jpagex)
200
- - [#12](https://github.com/raphiniert-com/ra-data-postgrest/pull/12), Fixed limit parameter - @[jpagex](https://github.com/jpagex)
201
-
202
- ## v1.0.4 - 2020-06-08
203
-
204
- ### Fixes
205
-
206
- - Fixed missing js files in npm package [#8](https://github.com/raphiniert-com/ra-data-postgrest/issues/8)
207
- - [#9](https://github.com/raphiniert-com/ra-data-postgrest/pull/9), Fixed typo in readme - @[seclace](https://github.com/seclace)
208
-
209
- ## v1.0.3 - 2020-05-17
210
-
211
- ### Fixes
212
-
213
- - Fixed bug when multidelete - @[colonist4096](https://github.com/colonist4096)
214
- - [#5](https://github.com/raphiniert-com/ra-data-postgrest/pull/6), Fixed bug while using multiple filters on the same attribute - @[olivierdalang](https://github.com/olivierdalang)
215
-
216
- ## v1.0.2 - 2020-03-10
217
-
218
- ### Fixes
219
-
220
- - [#4](https://github.com/raphiniert-com/ra-data-postgrest/pull/4), Fixed bug while using ReferenceField with UUID - @[xero88](https://github.com/xero88)
221
-
222
- ## v1.0.1 - 2020-02-01
223
-
224
- - initial release
1
+ # Change Log
2
+
3
+ Find all notable changes of this project in this file.
4
+
5
+ ## v2.2.0 - 2024-06-28
6
+ ### Improvements
7
+ - [#123](https://github.com/raphiniert-com/ra-data-postgrest/pull/125) Adding global sort order options @[kav](https://github.com/kav)
8
+
9
+ ## v2.1.0 - 2024-02-27
10
+ ### Improvements
11
+ - updated dependencies
12
+
13
+ ### Fixes
14
+ - [#123](https://github.com/raphiniert-com/ra-data-postgrest/pull/123) Modifying update call to only update changed fields @[kav](https://github.com/kav)
15
+
16
+
17
+ ## v2.0.0 - 2023-12-29
18
+ ### Improvements
19
+ - updated dependencies
20
+
21
+ ### Fixes
22
+ - [#113](https://github.com/raphiniert-com/ra-data-postgrest/pull/113) remove {} value wrapping for cs/cd @[ruslantalpa](https://github.com/ruslantalpa)
23
+
24
+ ### Breaking changes
25
+ - the fix in this version might break old versions, as the {} are removed. Thus, one needs to manually add the {} for cs/cd.
26
+
27
+
28
+ ## v2.0.0-alpha.4 - 2023-10-23
29
+ ### Improvements
30
+ - updated dependencies
31
+
32
+ ### New feature
33
+ - [#100](https://github.com/raphiniert-com/ra-data-postgrest/pull/100) support "meta.columns" on all code paths (useful when the user does not have permissions on all the columns in which case doing select=* gives permissions errors) - @[ruslantalpa](https://github.com/ruslantalpa)
34
+
35
+ ### Fixes
36
+ - [#50](https://github.com/raphiniert-com/ra-data-postgrest/issues/50) and [#88](https://github.com/raphiniert-com/ra-data-postgrest/issues/88) solved by [#100](https://github.com/raphiniert-com/ra-data-postgrest/pull/100) including other fixes - @[ruslantalpa](https://github.com/ruslantalpa)
37
+
38
+
39
+ ## v2.0.0-alpha.3 - 2023-06-16
40
+ ### Improvements
41
+ - updated dependencies
42
+
43
+ ### New feature
44
+ - [#82](https://github.com/raphiniert-com/ra-data-postgrest/pull/82), add logical operator filter parsing - @[jordiyapz](https://github.com/jordiyapz)
45
+
46
+ ### Fixes
47
+ - [#81](https://github.com/raphiniert-com/ra-data-postgrest/pull/81), use {} with cs and cd operators url - @[YannBeauxis](https://github.com/YannBeauxis)
48
+
49
+ ### Breaking changes
50
+ - Changed from from regular parameters to instantiate the dataProvider to a configuration interface/class. Thus, in future initalize the dataProvider by creating a structure which implements the interface:
51
+
52
+ ```jsx
53
+ import { fetchUtils } from 'react-admin';
54
+ import postgrestRestProvider,
55
+ { IDataProviderConfig,
56
+ defaultPrimaryKeys,
57
+ defaultSchema } from '@raphiniert/ra-data-postgrest';
58
+
59
+ const config: IDataProviderConfig = {
60
+ apiUrl: 'http://path.to.my.api/',
61
+ httpClient: fetchUtils.fetchJson,
62
+ defaultListOp: 'eq',
63
+ primaryKeys: defaultPrimaryKeys,
64
+ schema: defaultSchema
65
+ }
66
+
67
+ dp = postgrestRestProvider(config);
68
+ ```
69
+
70
+ ## v2.0.0-alpha.2 - 2023-04-24
71
+ ### Improvements
72
+ - updated dependencies
73
+
74
+ ### New feature
75
+ - [#49](https://github.com/raphiniert-com/ra-data-postgrest/issues/49), custom schema name can be used
76
+
77
+ ## v2.0.0-alpha.1 - 2023-04-09
78
+ ### Improvements
79
+ - updated dependencies
80
+ - updated `urlBuilder` and integrated URL encoding
81
+
82
+ ### New feature
83
+ - [#48](https://github.com/raphiniert-com/ra-data-postgrest/issues/48) solved by pull request [#55](https://github.com/raphiniert-com/ra-data-postgrest/pull/55), the create method should return the data returned by postgrest and not the posted data - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
84
+ - [#39](https://github.com/raphiniert-com/ra-data-postgrest/pull/39), allow passing extra headers via meta for react-admin hooks - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
85
+ - [#41](https://github.com/raphiniert-com/ra-data-postgrest/pull/41), allow columns filtering for getList and getManyReference - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
86
+ - added support of [#41](https://github.com/raphiniert-com/ra-data-postgrest/pull/41) for other functions, but `create` and `updateMany`
87
+ - [#38](https://github.com/raphiniert-com/ra-data-postgrest/pull/38), Let the sort param in getList be optional - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
88
+
89
+
90
+ ## v1.2.1 - 2023-04-07
91
+ - small fix in condition
92
+ - fixed package name
93
+
94
+ ## v2.0.0-alpha.0 - 2022-11-23
95
+
96
+ - [#42](https://github.com/raphiniert-com/ra-data-postgrest/issues/42), started adding some unit tests - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
97
+ - dropped authProvider
98
+ - code cleanup & restructuring
99
+ - minor bugfixes - @[christiaanwesterbeek](https://github.com/christiaanwesterbeek)
100
+ - added some notes to README.md
101
+
102
+ ### Breaking changes
103
+
104
+ - dropped authProvider as this should rather be an own package in case of a generic piece of software or application specific.
105
+
106
+ ## v1.2.0 - 2022-08-23
107
+
108
+ - [#33](https://github.com/raphiniert-com/ra-data-postgrest/pull/33), adding dependabot - @[promitheus7](https://github.com/promitheus7)
109
+ - [#30](https://github.com/raphiniert-com/ra-data-postgrest/pull/30) and [#33](https://github.com/raphiniert-com/ra-data-postgrest/pull/33), updated dependency to compatible starting from `ra-core` 4.1.x - @[corrideat](https://github.com/corrideat), @[promitheus7](https://github.com/promitheus7)
110
+
111
+ ## v1.1.9 - 2022-08-23
112
+
113
+ - [#30](https://github.com/raphiniert-com/ra-data-postgrest/pull/30), updated ts and modified code, such that some package dependencies became unrequired - @[corrideat](https://github.com/corrideat)
114
+
115
+ ## v1.1.8 - 2022-01-07
116
+
117
+ - required re-release as I missed to transpile all and upload the features of 1.1.7 to npm.
118
+
119
+ ## v1.1.7 - 2022-01-07
120
+
121
+ ### Fixes
122
+
123
+ - fixed bad behaivor with compound keys while using field named `id` [issue #27](https://github.com/raphiniert-com/ra-data-postgrest/issues/27) and [issue #19](https://github.com/raphiniert-com/ra-data-postgrest/pull/19) - @[kenfehling](https://github.com/kenfehling)
124
+
125
+ ### New feature
126
+
127
+ - [#26](https://github.com/raphiniert-com/ra-data-postgrest/pull/26), added rpc filter support, which is explained [here](https://github.com/raphiniert-com/ra-data-postgrest#special-filter-feature-rpc-functions) - @[TheRealAstroboy](https://github.com/TheRealAstroboy)
128
+
129
+ ## v1.1.6 - 2021-01-16
130
+
131
+ ### Fixes
132
+
133
+ - [#24](https://github.com/raphiniert-com/ra-data-postgrest/pull/24), fixed eq. prefix for non-compound keys [issue #23](https://github.com/raphiniert-com/ra-data-postgrest/issues/23) - @[andymed-jlp](https://github.com/andymed-jlp)
134
+
135
+ ## v1.1.5 - 2021-01-16
136
+
137
+ ### Fixes
138
+
139
+ - fixed query string generation of rpc endpoints [issue #22](https://github.com/raphiniert-com/ra-data-postgrest/issues/22)
140
+
141
+ ### Breaking changes
142
+
143
+ - Support was dropped for generating the query string given many ids in case of an rpc endpoint. If your application has some psql functions which parse the standard input, I recommend to rework your db design. If this change causes strong damage to your application, please contact me in order to find a proper generic solution. Query strings of single rpc calls now drop the operator (`eq.`) and are generated properly.
144
+
145
+ ## v1.1.4 - 2021-01-16
146
+
147
+ - deployment error
148
+
149
+ ## v1.1.3 - 2020-11-30
150
+
151
+ ### Fixes
152
+
153
+ - [#20](https://github.com/raphiniert-com/ra-data-postgrest/pull/20), fixed small bug in update - @[mkkane](https://github.com/mkkane)
154
+ - removed console log
155
+
156
+ ## v1.1.2 - 2020-10-05
157
+
158
+ ### Fixes
159
+
160
+ - fixed the last fix of getMany and getManyReferecnce for compound keys :)
161
+
162
+ ## v1.1.1 - 2020-09-28
163
+
164
+ ### Fixes
165
+
166
+ - fixed getMany and getManyReferecnce for compound keys
167
+
168
+ ## v1.1.0 - 2020-09-16
169
+
170
+ ### Fixes
171
+
172
+ - removed requirement to define order key in react admin, when using compound keys: default was `id`, now it's the compound key
173
+
174
+ ### Breaking changes
175
+
176
+ - refactored compound primary keys:
177
+ For single custom keys wrap an array as follows:
178
+ ```jsx
179
+ const dataProvider = postgrestRestProvider(
180
+ API_URL,
181
+ fetchUtils.fetchJson,
182
+ 'eq',
183
+ new Map([
184
+ ['some_table', ['custom_id']], // <- instead of ['some_table','custom_id']
185
+ ['another_table', ['first_column', 'second_column']],
186
+ ])
187
+ );
188
+ ```
189
+
190
+ ## v1.0.7 - 2020-08-23
191
+
192
+ ### New feature
193
+
194
+ - [#14](https://github.com/raphiniert-com/ra-data-postgrest/pull/14), added compound primary keys (see [README.md](https://github.com/raphiniert-com/ra-data-postgrest/blob/master/README.md#compound-primary-keys)) - @[programmarchy](https://github.com/programmarchy)
195
+
196
+ ### Maintenance
197
+
198
+ - `import React from 'react';` -> `import * as React from 'react';`
199
+ - Some minor code cleanup
200
+
201
+ ## v1.0.6 - 2020-06-15
202
+
203
+ ### Fixes
204
+
205
+ - Fixed wrong support statement concerning [postgrest starter kit](https://github.com/subzerocloud/postgrest-starter-kit) in readme
206
+
207
+ ## v1.0.5 - 2020-06-15
208
+
209
+ ### Fixes
210
+
211
+ - [#13](https://github.com/raphiniert-com/ra-data-postgrest/pull/13), Remove console.log - @[jpagex](https://github.com/jpagex)
212
+ - [#12](https://github.com/raphiniert-com/ra-data-postgrest/pull/12), Fixed limit parameter - @[jpagex](https://github.com/jpagex)
213
+
214
+ ## v1.0.4 - 2020-06-08
215
+
216
+ ### Fixes
217
+
218
+ - Fixed missing js files in npm package [#8](https://github.com/raphiniert-com/ra-data-postgrest/issues/8)
219
+ - [#9](https://github.com/raphiniert-com/ra-data-postgrest/pull/9), Fixed typo in readme - @[seclace](https://github.com/seclace)
220
+
221
+ ## v1.0.3 - 2020-05-17
222
+
223
+ ### Fixes
224
+
225
+ - Fixed bug when multidelete - @[colonist4096](https://github.com/colonist4096)
226
+ - [#5](https://github.com/raphiniert-com/ra-data-postgrest/pull/6), Fixed bug while using multiple filters on the same attribute - @[olivierdalang](https://github.com/olivierdalang)
227
+
228
+ ## v1.0.2 - 2020-03-10
229
+
230
+ ### Fixes
231
+
232
+ - [#4](https://github.com/raphiniert-com/ra-data-postgrest/pull/4), Fixed bug while using ReferenceField with UUID - @[xero88](https://github.com/xero88)
233
+
234
+ ## v1.0.1 - 2020-02-01
235
+
236
+ - initial release