Summary: To be able to edit correct cell, identifiers are needed. Assume that the primary key is unique, this should be safe to allow the query to find exactly one row to edit
Reviewed By: jknoxville
Differential Revision: D21788239
fbshipit-source-id: b09d1b6da1b46cbc961f08010467e973546acbef
Summary: This diff adds edit button to detail sidebar to allow user to edit column he/she wants to
Reviewed By: jknoxville
Differential Revision: D21788243
fbshipit-source-id: 4bdcef62114d5a6282ba85bc2bd1b5d039322e50
Summary:
This logic relies on the logic on client side, specifically `SqliteDatabaseDriver.java` in specifying some keys to retrieve useful data in `currentStructure`. This will be error-prone if developer writes their own data driver which doesn't follow the same naming as the data driver used as model.
Also, this diff adds util file to deal with query for updating database on client side.
I decided to construct query clause on server side so that the client side change is not needed.
Reviewed By: jknoxville
Differential Revision: D21788241
fbshipit-source-id: cf9a920c3e5b7b29f619bc3f00e68616b3445cab
Summary: The different is small after the change from storing pre-rendered data to raw data. Hence, the diff changes it to match `currentPage` to ease the assignment (used in next diffs)
Reviewed By: jknoxville
Differential Revision: D21788245
fbshipit-source-id: 87bdbce33f0615bf31878797a74fce5d5969db7b
Summary: `'Execute'` action was previously used only for execute tab which assumed the input will come from the state. This changes so that it can take any input attached to parameters (more explanation about the design in <insert diff number>)
Reviewed By: jknoxville
Differential Revision: D21788244
fbshipit-source-id: 8fb8ecb8f8df84f4854f70432e7a1fdb531403e9
Summary: This diff helps obtaining metadata for using to edit row
Reviewed By: jknoxville
Differential Revision: D21788246
fbshipit-source-id: bf01eff8866c82f001575d59cc2886b6cdd39dc5
Summary:
This refactor has the following changes:
- Change way to store data: raw data instead of rendered data
- Move render function to separated function component file
- Remove repetitive pattern
Reviewed By: jknoxville
Differential Revision: D21739468
fbshipit-source-id: 1f7e7ae902c3b55f3863300aaed26c2adda898ac
Summary:
As suggested in the previous diff, I change the way to store row values. Now, (kinda) raw values are stored instead of processed values that can be used directly for `ManagedTable`. This simplifies logic in detail sidebar.
I'm not sure what the effect to performance.
Reviewed By: mweststrate
Differential Revision: D21621896
fbshipit-source-id: 472be3caa955ca32f876f81095af21e9c17cb159
Summary:
This allows long text to be seen on the sidebar in database plugin. Also, remove weird padding in the sidebar and separate sidebar component to a new file
Refactoring is in the next diff
Reviewed By: mweststrate
Differential Revision: D21550672
fbshipit-source-id: 3e80be16783719e18392fe3d8f8068caf9283f8f
Summary:
As mentioned in [the first comment in the Github issue](https://github.com/facebook/flipper/issues/989#issuecomment-616673590), we were mixing database `id` given from client and `index + 1` on server side. After investigating, most are used correctly; it searches `id` from given database `name`. However, there are a few (if not one) that, in my opinion, was used incorrectly. For example, [`tableOption`](https://fburl.com/diffusion/vlo7xbo1) assumed `id - 1` is the index, which is sometime incorrect.
This diff sorts the database listed from client by `id` before storing in the state.
Changelog: Fixed wrong order assumption on server side
Reviewed By: jknoxville
Differential Revision: D21496345
fbshipit-source-id: 5e15f776356b0357ac14fbde6c2a11efd76cd1e1
Summary:
- Add detail sidebar to data tab. This reuses `renderSidebar` from SQL tab
- `renderTable` function is moved into the component to easier access `renderSidebar`
Reviewed By: mweststrate
Differential Revision: D21406942
fbshipit-source-id: 5c79489a80931b1133c0a28ca5897a27ba9dd6b8
Summary:
Mainly convert `js` to `tsx`
Additional change:
- Try not to directly change object value in reduce function
- Add emotion styled when there is error using style prop directly
Reviewed By: nikoant
Differential Revision: D21406943
fbshipit-source-id: 30312fa0b0d2d70fa52c5ff9db747e1a83beb270