Skip to content

Releases: lucarota/salesforce-jdbc

2.0.2

18 Jun 14:26

Choose a tag to compare

  • Legacy URL Support:
    • Added support for the legacy jdbc:ascendix:salesforce URL prefix in addition to jdbc:rotaliano:salesforce.
    • Added warning logs when the deprecated jdbc:ascendix:salesforce prefix is used, urging users to migrate to the standard prefix.
  • Standard Nullity Expression Rewriting:
    • Added rewriting support for standard IS NULL and IS NOT NULL expressions in SOQL queries, translating them to = NULL and <> NULL to comply with Salesforce SOQL syntax constraints.
  • Support for Client-Side COALESCE Function:
    • Implemented the client-side COALESCE function in both SELECT projections and WHERE clauses.
    • In SELECT projections, it automatically rewrites incoming queries to request all underlying fields, resolving the first non-null value in-memory.
    • In WHERE clauses, it recursively rewrites comparisons containing COALESCE into standard SOQL boolean logic (using AND/OR chains) so filtering runs database-side, performing client-side constant folding to simplify logic and prune false literal comparison branches.
  • Dependency Refactoring:
    • Migrated from the deprecated Parenthesis class to ParenthesedExpressionList in JSQLParser.
  • Documentation:
    • Added details on custom functions, performance implications, and WHERE clause behavior to the README.
  • Client-Side CASE WHEN Expression in SELECT:
    • Implemented support for SQL CASE WHEN THEN ELSE END constructs in SELECT projections.
    • Since Salesforce SOQL does not natively support CASE expressions, the driver rewrites the query to fetch all underlying columns referenced in the CASE statement, evaluates the expression in-memory row-by-row, and returns the computed value in the ResultSet under the specified alias.
    • Both searched (WHEN <condition> THEN) and simple (CASE <field> WHEN <value> THEN) forms are supported.
    • Supported condition operators include comparisons (=, !=, <, >, <=, >=, LIKE), nullity checks (IS NULL, IS NOT NULL), and logical connectives (AND, OR, NOT).

2.0.1

20 May 19:11

Choose a tag to compare

  • Support for OAuth 2.0 Client Credentials Authentication:
    • Implemented client credentials flow using clientId and clientSecret parameters.
    • Automatically fetches OAuth 2.0 access tokens and resolves organization metadata without modifying the core force-partner-api library.
    • Handles automatic session renewal and retry on expired/invalidated tokens.
    • Added caching for user info and access tokens to avoid redundant token requests.
  • Enhanced Configuration & Validation:
    • Requires a custom loginDomain for Client Credentials authentication, raising an error for unsupported generic domains (login.salesforce.com or test.salesforce.com).
    • Added warning logs when using the legacy sandbox parameter along with OAuth parameters.
  • Security & Logging Improvements:
    • Added masking of clientSecret / client_secret parameter values in JDBC URLs, connection info logs, and error messages.
  • Build Infrastructure & Tooling:
    • Upgraded Project Lombok to 1.18.36 for complete compatibility with JDK 21+ and JDK 25.
    • Configured explicit annotation processor paths in Maven compiler plugin.
  • Testing Improvements:
    • Added unit tests for OAuth token handling and error retries.
    • Added pre-production integration tests (selectOAuthPreprod_record, insertOAuthPreprod_record, updateOAuthPreprod_record) in ForceDriverConnectivityTest using live Preprod credentials.

2.0.0

19 Mar 16:38

Choose a tag to compare

  • Preserved SQL SELECT field order in flattened results:

    • Added tracking of fields in their original SQL SELECT order.
    • Flattened field definitions now preserve the order written in the query, even when relationship fields are internally reorganized for Salesforce API compatibility.
    • Untracked fields such as subqueries or computed fields are still appended correctly.
  • Improved result expansion for missing relationship values:

    • Expanded result rows now handle missing relationship fields more safely.
    • When Salesforce omits relation values, placeholder fields are inserted to keep the result structure aligned with the schema.
  • Introduced a shared abstract base for prepared statements:

    • Added a new AbstractPreparedStatement class to centralize default stub implementations for unsupported JDBC PreparedStatement methods.
    • This reduces duplication and makes statement implementations easier to maintain.
  • Connection handling improvements:

    • Improved Salesforce connection lifecycle structure with clearer support for refreshed partner connections after reconnect or re-login operations.
    • Added a unique internal identifier for each connection instance to better support session-scoped resources such as caches.
  • Documentation and maintainability improvements:

    • Expanded inline documentation for connection and statement behavior.
    • Clarified which JDBC features are intentionally unsupported or implemented as no-ops in the Salesforce driver.