* feat: Add a service layer to get AppsmithType from client-type (#16508)
This commit takes care of the following things
- It creates a service layer to get the target AppsmithType from the client-side data type and the evaluated value
- This service layer is currently not consumed by any plugins
- A full JUnit test suit for MySQL-specific types
* feat: Remove FloatType and add comments for better understanding (#16508)
* feat: Add FallbackType and covert the DataTypeService to a util class (#16508)
This commit takes care of these
- Introduce FallbackType as a separate type
- Convert the DataTypeService to a util class
- Add java doc around the methods in DataTypeService class
* feat: Rename DataTypeService to DataTypeServiceUtils (#16508)
On macOS, when running a MySQL query, we see the following error:
```
java.lang.ClassCastException: class io.netty.channel.kqueue.KQueueEventLoopGroup cannot be cast to class io.netty.channel.EventLoopGroup
```
This is because of a `LinkageError`, caused because these classes exist both in the parent `server` module classpath, as well as in this plugin's classpath separately. To fix this, we removed this dependency from the server module.
But then, this caused a problem with how the `DNSResolver` class was being, well, resolved by the application class loader, vs the plugin class loader. This is a macOS specific problem, and doesn't affect other operating systems.
For this, we add just this package as a dependency to the MySQL plugin.
* feat: Add server-side base data types (#15784)
This commit takes care of the following two things
- It adds the server-side base data types which are considered common data types across plugins
- It adds a few MySQL specific types
* feat: Add MySQLBooleanType and refactor MySQLDateTimeType with camelCase (#15784)
* feat: Move MySQL specific types to mysqlPlugin folder (#15784)
Upgrades vulnerable dependencies in all plugins except for MySQL. That one is still failing and I'll fix it in a separate PR. Issue #14475
Co-authored-by: Nayan <nayan@appsmith.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
* 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 field to autogenerate values in DB column
* Added comment and refactor
* Autogenerate field update according to names instead of type for ArangoDB
* Correcting text for Mongo Form Insert command
* Getting Prepared Statement for Postgres, MySQL, and MS-SQL and Smart Substitution for Rest API plugins out of beta
* Fixed failing test case
* Fixed Ms-sql plugin test failure
- return request parameters with type for debug tab.
- request params are stored in a RequestParamDTO object.
- a configProperty -> label map is cached in pluginService, which returns the param label as per the configProperty it is mapped to via editor.json file.
- This feature currently only works with prepared statements disabled.
* WIP : Migration of data type for smart substitution configuration
* Fixed the migration code. Also reverted editor.jsons back to equality check after migrations of existing actions
* Only fetching actions for plugins which belong to supported plugins.
* Setting a default value of "false" for all the actions which don't have a valid configuration for smart substitution.
* Minor code formatting
* Minor language change in comment
* Removed debug logs
* WIP : Type migration from String to Object for value
* Migrating config from string to boolean for prepared statement.
Handled error for already stored actions where PS config is stored as String and not Boolean.
* Added dependencies to be added to dependencyMap on client to Postgres, MSSQL, MySQL and Mongo plugins
* Added Dependency config for API
* Fixed the test case
- add title to action execution errors to improve user experience
- all errors in AppsmithPluginErrors
- action execution related errors in AppsmithError : NO_CONFIGURATION_FOUND_IN_DATASOURCE, INVALID_ACTION, INVALID_DATASOURCE, INVALID_DATASOURCE_CONFIGURATION - as these are the likely errors in an action execution flow (excluding plugin specific flow) that might result from faulty action / datasource configuration by a user.
- title is returned as part of ActionExecutionResult.
- title is set in ActionExecutionResult on failure during action execution.
- In response to review comment - added a new BaseException class, so that both AppsmithException and AppsmithPluginException extend this base class. Also, refactored code to introduce setErrorInfo() function in ActionExecutionResult class to set its attributes.
- Some unrelated cleanup:
- catch PoolInitializationException for Postgres plugin and return AppsmithPuginException
- catch MongoTimeoutException and return AppsmithPluginException
* Feature : JSON Smart Substitution in Mongo Plugin
* Added BSON data type for Mongo substitution. Added test case
* Minor comment added
* Minor variable re-naming and correcting failing test cases.
* REST API : Escaping special characters in string before smart substitution
* Incorporated review comment
* Smart Substitution Debugging - Adding appsmith data type to each parameter in response's request object for execute
* Incorporated review comments.
* Fixed failing test cases.
* Fixed MS-SQL test failures.
- Return hint message if identical column names are found in SQL query for postgres, MySQL, mssql, redshift plugin.
- Add a PluginUtils class to hold general utility functions for plugins.
- Provide non client certificate based SSL support for Mysql, Mongo, Postgres plugins.
- Added a new option default, apart from the the SSL mode types supported by the driver. Default means that go with whatever default configuration driver provides.