Skip to content

Releases: MarketSquare/Robotframework-Database-Library

v.2.0.4

11 Oct 08:11
Compare
Choose a tag to compare

What's Changed

  • Fix #227 path length issue with ibmdb on Windows

Full Changelog: v2.0.3...v.2.0.4

v2.0.3

09 Oct 09:21
Compare
Choose a tag to compare

What's Changed

  • Fix version visibility in keyword documentation by @eeter in #226

New Contributors

Full Changelog: v2.0.2...v2.0.3

v2.0.2

01 Oct 15:20
Compare
Choose a tag to compare

Fix #223 ImportError with ibm_db > version 3.2.0

If running on Windows and with ibm_db or ibm_db_dbi module, the library determines current installation path of the module, adds clidriver/bin to it and adds the result to list of DLL's using os.add_dll_directory.

Full Changelog: v2.0.0...v2.0.2

v2.0.0

01 Oct 10:29
d4ba70a
Compare
Choose a tag to compare

Database Library 2.0.0 is a new major release, bringing new keywords with inline assertions using Assertion Engine (#208) and retry mechanism (#209), logging query results in table format (#147), support for custom connection parameters (#220) and other improvements.

This version also contains renamed keyword parameters and deprecations of keywords and requires Python 3.8 or newer and Robot Framework 5.0.1 or newer.

New features and improvements

  • New keywords Check Row Count and Check Query Result with assertion engine and retry mechanism. #208 #209
  • Query results are now automatically printed in table format in RF log. This behaviour can be adjusted or disabled. See docs for details. #147
  • Handling of connection parameters in keyword Connect To Database was deeply refactored. There is only one mandatory parameter left - db_module, all other parameters are optional now. Plus any custom parameters are supported now - both provided as keyword arguments or in config file. See details in keyword docs. #220
  • Other logging in keywords was cleaned and improved.
  • Keyword parameters were renamed according to Python PEP8 - snake_case instead of formerly used camelCase. See more details below in the deprecations section.
  • Support for OUT params when calling a stored procedure in MSSQL, which doesn't return any result sets - implemented via new keyword argument additional_output_params. See extended docs of the Call Stored Procedure keyword. #219
  • The documentation of all keywords and the entire library was deeply cleaned, consolidated and improved.

Backwards incompatibilities and deprecations

  • This version requires Python 3.8 or newer and Robot Framework 5.0.1 or newer.
  • Keyword parameters were renamed according to Python PEP8 - snake_case instead of formerly used camelCase. Moreover, some parameter names were changed to shorter or more precise versions. The old parameter names are still supported, but deprecated - the library logs a warning in case of their usage. The deprecated old-named parameters will be removed in future versions. #188
  • Introducing new keywords Check Row Count and Check Query Result with inline assertions allows to deprecate some redundant keywords. They will be removed in future versions.
  • Support of custom parameters in the Connect To Database keyword allows to deprecate the Connect To Database Using Custom Params keyword - it's redundant now. The deprecated keyword will be removed in future versions.
  • During refactoring of connection parameters, some hardcoded fallback values were removed. These values can be still set, if required, with new support of any custom parameters in the Connect To Database keyword.
    • Stop using localhost as fallback value for DB host
    • Stop using {SQL Server} as fallback value for pyodbc driver
    • Stop using TCPIP as fallback valued for ibm_db protocol

Full Changelog: v1.4.4...v2.0.0

v1.4.4

28 Feb 15:36
26b49ef
Compare
Choose a tag to compare

What's Changed

  • Fix handling query params for MS SQL - switch internal params handling from lists to tuples #211 in #212

Full Changelog: v1.4.3...v1.4.4

v1.4.3

19 Dec 20:30
Compare
Choose a tag to compare

Move new parameters, introduced in 1.4.2, to the end in order to avoid possible backwards incompatibility

v1.4.2

19 Dec 19:31
Compare
Choose a tag to compare

What's Changed

  • Fix #202 - no empty list is passed to the database module if no sql params were specified. Fixes an error if the database module doesn't accept an empty list as parameters.
  • Fix #184 - Improvements in parsing the PL/SQL script files.
  • The keyword Execute SQL Script has a new parameter split now - setting it to False disables splitting the SQL script into statements. In this case the entire script content will be passed to the database module for execution.
  • The keyword Execute SQL String has a new parameter omitTrailingSemicolon - for explicit instruction, if the trailing semicolon (;) at the SQL string end should be removed or not.
    • Setting it to False will fix an error, if the Oracle database exceptionally requires a semicolon at the end of the PL/SQL block. More details available here.
    • If not specified, it's decided based on the current database module in use. For Oracle, the semicolon is removed by default.
  • #201 - improved docs of the Query keyword - added a note, that result values might be not always tuples (depends on the database module)

Full Changelog: v1.4.1...v1.4.2

Thanks a lot to all contributors!

@amochin

v1.4.1

20 Nov 18:26
421dffe
Compare
Choose a tag to compare

What's Changed

  • Handle multiple DB connections with aliases - see usage example in readme
  • Support parametrised SQL requests - see the keyword Query for example
  • Option driverMode to support oracledb "thick" mode
    • This might introduce a breaking change in your tests, if you enabled the thick mode manually before - e.g. with such a call:
      Evaluate oracledb.init_oracle_client() modules=oracledb
      • This could produce an error message, because the library verifies internally, if the oracle mode is as expected - any by default it's the thin mode
      • You don't need this explicit initialisation anymore. If you set the driverMode to thick, this init will be called in the library itself.
  • Fix and improve error handling for missing or invalid configuration file
  • A good bunch of code refactoring, including type hints
  • Acceptance tests were improved and extended
  • Added unit tests

Full Changelog: v1.3.1...v1.4.1

Thanks a lot to all contributors!

@bhirsz, @nczita, @Rudolf-AT, @carnegiemedal, @amochin

v1.3.1

20 Jul 19:47
Compare
Choose a tag to compare

Fix #181 - different syntax for pyodbc connection string based on SQL driver - SQL Server drivers use a comma between server and port, others - a colon

Full Changelog: v1.3.0...v1.3.1

v1.3.0

17 Jul 19:11
Compare
Choose a tag to compare

This is a first release since 2019 and it contains some long-awaited bug fixes and improvements.

The library finally supports the new Oracle driver - oracledb.
Running the SQL script files has been improved - the UTF8 encoding is used by default now, values with semicolons and begin/end blocks are processed properly.
You can now provide custom error messages to assertion keywords. The default error messages were improved as well.
And a lot of other changes - see more details below.

The probably breaking changes are related to the Execute Sql Script and Call Stored Procedure keywords - see details below.

Most important changes

  • Added support for Teradata 15 & 16
  • Solve encoding problem - explicitely use UTF8 when running SQL script files
  • Support kingbase database
  • pyodbc - allow overriding dbDriver istead of always using "SQL Server"
  • The keyword "Disconnect From Database" doesn't fail by default now, if there was no open connection. The previous behavior with an error can be enforced using a special parameter.
  • Proper execution of SQL scripts containing semicolons in values - fixes #111
  • Fix #173 - keyword "Connect using custom params" doesn't require require quotes (") around the connection string any more
  • Fix #178 - keyword "table must exist" doesn't fail now, if the DB doesn't support information_schema
  • Fix #174 - Semicolons (';') after the SQL statement don't lead to error messages with Oracle DB - as they're omitted. Omitting semicolon at the end of an SQL statement is defined based on the DB module (by default True for Oracle only) and can be changed from outside - necessary for running some SQL scripts even in Oracle.
  • It's now possible to set charset when connecting via pyodbc
  • It's now possible to provide custom error message to assertion keywords - #162
  • Hide DB connection password in output logs
  • The error messages in assertion keywords were also generally improved - #179
  • Support for new Oracle driver - #166
  • Executing the SQL scripts was significantly improved. The statements are now separated more precisely. Also begin/end blocks are processed properly.
  • The Call Stored Procedure keyword has got a completely new implementation.
    • It supports pymysql, oracledb/cx_Oracle, psycopg2, pymssql now
    • For not supported DB's there is a warning message and more cautious attempt to get results
    • The keyword returns now both param values and result sets (even multiple sets for supported DB)
    • Special handling for OUT params of cursor type
    • See more in the keyword docs

A lot of work was also done in the backstage

  • CI setup for tests and keyword docs publishing
  • Tests were unified, restructured and extended
  • Repository cleanup
  • Package and setup infos, setup and metadata were updated as well
  • Readme and docs

Thanks a lot to all contributors!

@kivipe, @denghj, @adrianyorke, @zhouziyang2012, @snoozebear, @IlfirinPL, @kad-derksn, @emanlove, @robinmatz, @carnegiemedal, @gsusin, @amochin

Full Changelog: v1.1.1...v1.3.0