* ArangoDB has two types of command - one that fetches a response and the other that updates a document. Currently, ArangoDB plugin treats all cmds like the one that returns a response, hence when update cmds are run then an empty response is returned to the client since there is nothing to fetch. This PR adds a check to fetch the response based on the type of cmd. Hence, for an update cmd the number of writes succeeded or failed would be returned as a response.
* Adding `APPSMITH_PLUGIN_MAX_RESPONSE_SIZE` which can be configured as an environment variable to increase plugin response size (currently only supported for Postgres Plugin)
* Updated error message + added the environment variable to the template docker env files for new installations
* Minor refactoring
* Partial code change to replace question mark with appsmith placeholder
* Working version
* Removing unnecessary code
* Added test case to assert that when evaluated value contains a "?", the replacements are still correct
* Added test case in Mongo Plugin as well for the same scenario
* Minor change in the language of the comment
* Added smart defaults for query in Count, Distinct & Find commands
* Added test cases for smart inputs for query and limit for find, and query for count and distinct
* This method removes the outermost quotes - single or double quotes - so that end users don't have to do it via javascript inside widget fields where they are meant to be bound.
* The input box label in the Firestore plugin action editor reads Document / Collection Path which is misleading since a document is nested inside a collection and not the other way round. Hence changing it to Collection / Document Path
* A fix had been introduced earlier (I had introduced it a few months back) to remove data type info keys from the raw response. However, the transformation was not getting applied to the Query action as the transformation was explicitly limited to few actions. This PR removes that check and allows the transformation for all actions as there does not seem to be any reason to withhold this transformation for other actions.
* The earlier fix also restricted this transformation to results that had specific keys. This PR removes this check as well as it does not seem to be required and further may lead to similar issues if any particular key gets missed.
* Some other redundant checks have been removed from the flow as the transformation function itself takes care of it as edge/base case.
* Earlier split method was used to segregate cmd and args which failed when multiple words inside a quoted string formed one argument. e.g. set key "my value" would produce set, key, "my, value" as the tokens when split method is used, which is not correct. This change introduces a regex that would create the following tokens: set, key, "my value"
* Added field to autogenerate values in DB column
* Added comment and refactor
* Autogenerate field update according to names instead of type for ArangoDB
* 1. For binary data in the response, base64 encoding the same before sending it out on the wire (instead of default conversion to string)
2. Added a new header which sets the data type of the response body.
* Minor code reformatting
* Fixed failing test cases
* The new header created should send the values in an array instead of a single value
* API to run DB query using plugin specified templates
* Included get spreadsheet metadata in get info method
* Added TCs for checking Spreadsheet info response
* Added error message for invalid datasources
* Authentication check for datasource modified to AuthenticationStatus field
* Adding support for explicit data type casting in postgres prepared statement
* Added text and int psql data types for support in explicit typecasting
* Documenting the code
The default charset is determined during virtual-machine startup and typically depends upon the locale and charset of the underlying operating system (#5788)
Co-authored-by: 王昆 <quincy@cloudtogo.cn>
* add support in Redis plugin to select database when creating db connection.
* refactor code to use URI string instead of constructor call, because of lack of appropriate constructor.
* add TCs.
* fix validate datasource.
* return hint message to user if the expected content type is json but the api response is not a valid json.
Co-authored-by: Apeksha Bhosale <7846888+ApekshaBhosale@users.noreply.github.com>