tree: b97c167a84d510fff5d596a0618de0832075eb29 [path history] [tgz]
  1. com/
  2. inc/
  3. org/
  4. qa/
  5. registry/
  6. source/
  7. workben/
  8. AllLangMoTarget_cnr.mk
  9. Configuration_ado.mk
  10. Configuration_calc.mk
  11. Configuration_dbase.mk
  12. Configuration_evoab.mk
  13. Configuration_firebird.mk
  14. Configuration_flat.mk
  15. Configuration_hsqldb.mk
  16. Configuration_jdbc.mk
  17. Configuration_macab.mk
  18. Configuration_mysql.mk
  19. Configuration_mysql_jdbc.mk
  20. Configuration_odbc.mk
  21. Configuration_postgresql.mk
  22. Configuration_writer.mk
  23. CppunitTest_connectivity_ado.mk
  24. CppunitTest_connectivity_commontools.mk
  25. CppunitTest_connectivity_mysql_test.mk
  26. CppunitTest_connectivity_sharedresources.mk
  27. IwyuFilter_connectivity.yaml
  28. Jar_ConnectivityTools.mk
  29. Jar_sdbc_hsqldb.mk
  30. JunitTest_complex.mk
  31. Library_ado.mk
  32. Library_calc.mk
  33. Library_dbase.mk
  34. Library_dbpool2.mk
  35. Library_dbtools.mk
  36. Library_evoab.mk
  37. Library_file.mk
  38. Library_firebird_sdbc.mk
  39. Library_flat.mk
  40. Library_hsqldb.mk
  41. Library_jdbc.mk
  42. Library_macab1.mk
  43. Library_macabdrv1.mk
  44. Library_mozbootstrap.mk
  45. Library_mysql_jdbc.mk
  46. Library_mysqlc.mk
  47. Library_odbc.mk
  48. Library_postgresql-sdbc-impl.mk
  49. Library_postgresql-sdbc.mk
  50. Library_sdbc2.mk
  51. Library_writer.mk
  52. Makefile
  53. Module_connectivity.mk
  54. Package_postgresql-sdbc.mk
  55. Rdb_postgresql-sdbc.mk
  56. README.md
connectivity/README.md

Database Connectivity

Contains database pieces, drivers, etc.

dbaccess builds UI on top of this.

Testing

PostgreSQL

For testing, use:

podman pull postgres:latest
podman run --name=postgres -e POSTGRES_PASSWORD=foobarbaz -p 127.0.0.1:5432:5432 postgres:latest

In Base, Connect to an existing database, select PostgreSQL:

URL: host=127.0.0.1 port=5432 dbname=postgres
User: postgres
Password: foobarbaz

podman stop postgres
podman rm postgres

In order to test SCRAM authentication, create the container like this:

podman run --name=postgres -e POSTGRES_PASSWORD=foobarbaz -e POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256 -e POSTGRES_HOST_AUTH_METHOD=scram-sha-256 -p 127.0.0.1:5432:5432 postgres:latest

MySQL

For mysql_test:

  • The CppunitTest_mysql_test unit test can be used to test the mysqlc library with any versions of mysql or mariadb server of your choice.

  • This test does not run automatically. It can be triggered with setting the environment variable "CONNECTIVITY_TEST_MYSQL_DRIVER".

  • The environment variable should contain a URL of the following format: [user]/[passwd]@sdbc:mysql:mysqlc:[host]:[port]/db_name

  • tl;dr:

    podman pull mariadb/server
    podman run --name=mariadb -e MYSQL_ROOT_PASSWORD=foobarbaz -p 127.0.0.1:3306:3306 mariadb/server
    podman exec -it mariadb /bin/bash -c "echo -e CREATE DATABASE test | /usr/bin/mysql -u root"
    (cd connectivity && make -srj8 CppunitTest_connectivity_mysql_test CONNECTIVITY_TEST_MYSQL_DRIVER="root/foobarbaz@sdbc:mysql:mysqlc:127.0.0.1:3306/test")
    podman stop mariadb
    podman rm mariadb