Commit graph

302 commits

Author SHA1 Message Date
Maurits van der Schee
88b7bdb41a bugfix 2017-03-07 04:17:15 +01:00
Maurits van der Schee
40be702430 Merge branch 'master' of github.com:mevdschee/php-crud-api 2017-03-05 02:41:26 +01:00
Maurits van der Schee
c060399550 Improve CORS header implementation 2017-03-05 02:40:20 +01:00
Maurits van der Schee
3fadb01951 updated json2xml.php 2017-03-03 23:55:10 +01:00
Karl Hughes
244696c091 Allowing json, jsonb in postgres 2017-02-27 12:50:21 -06:00
mevdschee
4f5f7cf2d3 bugfix 2017-02-27 14:33:07 +01:00
Maurits van der Schee
7e0c2410be bugfix 2017-02-26 23:05:16 +01:00
Maurits van der Schee
6da5732fd0 Fix for #193, thank you jr3cermak 2017-02-26 14:33:41 +01:00
Maurits van der Schee
18b29420e8 Fix for #193, thank you jr3cermak 2017-02-26 14:15:06 +01:00
Maurits van der Schee
16a2abec99 Fix for #193, thank you jr3cermak 2017-02-26 13:57:41 +01:00
Maurits van der Schee
1e7b510062 bugfix 2017-02-26 04:05:09 +01:00
Maurits van der Schee
082d5e4a37 bugfix 2017-02-26 04:01:43 +01:00
Maurits van der Schee
34c7ac98ff Small fix for #192 and #192 to detect integer types 2017-02-26 02:02:54 +01:00
Maurits van der Schee
71a62e9439 small bugfix for #191 and #192 2017-02-26 01:44:32 +01:00
Maurits van der Schee
e718557ced Refactor for #191 and #192 2017-02-26 01:18:25 +01:00
Maurits van der Schee
83035f5aab Refactor for #191 and #192 2017-02-26 00:27:55 +01:00
Maurits van der Schee
72e11f221e Merge branch 'master' into master 2017-02-25 22:43:03 +01:00
Rob Cermak
7fb964c469 Add translation of numeric types in MySQL to actual types. 2017-02-24 18:47:26 -09:00
Rob Cermak
6de69b2abd Add x-dbtype to show actual field type from database. 2017-02-24 12:47:17 -09:00
Barry Dam
4738b91246 db-type in metadata
First of all, thanks for building this great php api framework and sharing it with the world!

I am a SAP Developer mainly developping JS apps with SAPui5 / OpenUit (https://open.sap.com/)
And for Sapui5 to work with your API, i made a SAPui5 model implementation of your api
With this model I can retrieve, edit and send data to your api and bind it to my views.

Other SAPui5 Models (like Odata) auto convert api response data to usable js json objects.
for example. Any date/time fields in the api will in js be converted to a new Date() object.

I wanted to do this too with my model implementation of your api.. but therefore I needed to know what db column and types my db tables have.

I found that in your metadata under paths/TABLENAME/post/parameters[0]/schema/properties
all db columns could be found.. and that all types are set to "string"

In order to get the db-types aswel I edited your class and added "db-type" to
paths/TABLENAME/get/responses/200/schema/items/properties/PROPERTYNAME

So now I can what what the column types are in the db, and so for my model I could convert a db column date to a js Date() object and viseversa.


note: I only added the query reflect_type to the MySQL class, I don't have the experience to write it also in PostgreSQL, SQLServer, SQLite.

hit me back what you think of it, and if maybe you are willing to accept the pull request or have a better solution, please let me know.

Barry
2017-02-24 15:58:04 +01:00
Maurits van der Schee
60ac51bdf7 Added xml2json for #176 2017-02-21 01:40:35 +01:00
Maurits van der Schee
68e406d3c7 Initial commit for #176 2017-02-20 02:07:33 +01:00
Maurits van der Schee
e284677b65 small name change 2017-02-18 11:26:13 +01:00
Maurits van der Schee
7e593ace3c Avoid exclusion of relationship columns, see #185 2017-02-18 11:02:46 +01:00
Maurits van der Schee
e2f9d8ac99 Improved implementation of #185 2017-02-18 08:59:22 +01:00
Maurits van der Schee
ee0c13ad37 Small adjustment of #185 2017-02-18 08:19:01 +01:00
Rob Cermak
81cbe434b7 Merge branch 'master' of https://github.com/mevdschee/php-crud-api 2017-02-16 22:19:37 -09:00
Rob Cermak
aeb02dff5c 1st attempt at adding exclude (issue #136). If both include and exclude are used, include happens first, then the exclude. The exclude list is either {columns/fields} or {table}.{columns/fields} in format. If the {columns/fields} format is used, it will only be applicable to responses with a single table. If relations are pulled in, be aware that excluding a specified table/field/column could have unintended consequences to the response. 2017-02-16 22:18:35 -09:00
Maurits van der Schee
bef88a9c8b Improve CSRF handling 2017-02-17 01:20:14 +01:00
Maurits van der Schee
d3f9c49f84 Improve CSRF handling 2017-02-17 00:22:14 +01:00
Maurits van der Schee
33bb0bfdb9 Revert #183 2017-02-15 18:20:31 +01:00
Barry Dam
500e6836ce List + Filter NE added
In response to issue [#182](https://github.com/mevdschee/php-crud-api/issues/182)
2017-02-15 16:35:19 +01:00
Maurits van der Schee
ea0a394491 CORS headers for auth 2017-02-12 23:48:05 +01:00
Maurits van der Schee
42e5f8aecd CORS headers for auth 2017-02-12 23:44:01 +01:00
Mark van Driel
da15a8346b Cs fixes 2017-02-12 21:30:41 +01:00
Mark van Driel
5eb5ec79e4 Cs fixes 2017-02-12 21:24:00 +01:00
Maurits van der Schee
bd2dcdf87e add Patch method to preflight 2017-02-12 19:46:13 +01:00
Maurits van der Schee
e3d3c1a362 Thank you Joaquín! 2017-02-09 22:20:15 +01:00
Maurits van der Schee
1809064da5 Avoid notice in error log 2017-02-05 14:41:01 +01:00
Maurits van der Schee
4be51e17d5 Add PATCH support for incrementing 2017-02-04 17:31:29 +01:00
Maurits van der Schee
684225f45e Implement PATCH for increment 2017-02-04 12:21:50 +01:00
Maurits van der Schee
5e1ea8a1bb Sort on multiple fields #162 2017-01-23 03:16:27 +01:00
Maurits van der Schee
3b4b7eb255 whitespace 2016-12-21 22:25:06 +01:00
Maurits van der Schee
026f2a12b9 Fixes for PHP 5.3 2016-12-17 22:26:05 +01:00
Maurits van der Schee
b18b226219 Fix for #158 (proper) 2016-12-17 20:46:05 +01:00
Maurits van der Schee
e3dd93f0f3 Fix for #158 2016-12-17 20:30:03 +01:00
Maurits van der Schee
8616b6795b Improve float and integer handling 2016-11-30 01:07:56 +01:00
Maurits van der Schee
c070ff30a8 Fix warning, see #132 2016-11-12 23:26:53 +01:00
Maurits van der Schee
41f3b24d84 batch read added to be consistent 2016-11-10 03:47:24 +01:00
Maurits van der Schee
18e935cdad Fix mysql reporting affected rows 2016-11-10 03:32:43 +01:00