{"id":31644123,"url":"https://github.com/quietboil/hdbtcl","last_synced_at":"2026-04-17T08:31:08.188Z","repository":{"id":206740774,"uuid":"292882638","full_name":"quietboil/hdbtcl","owner":"quietboil","description":"Hdbtcl is an extension to the Tcl language that provides access to SAP HANA database server","archived":false,"fork":false,"pushed_at":"2020-09-04T17:21:37.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-16T00:03:13.306Z","etag":null,"topics":["database","hana","sap","tcl"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quietboil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-09-04T15:26:41.000Z","updated_at":"2020-09-04T18:00:07.000Z","dependencies_parsed_at":"2023-11-12T00:41:53.141Z","dependency_job_id":null,"html_url":"https://github.com/quietboil/hdbtcl","commit_stats":null,"previous_names":["quietboil/hdbtcl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/quietboil/hdbtcl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Fhdbtcl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Fhdbtcl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Fhdbtcl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Fhdbtcl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quietboil","download_url":"https://codeload.github.com/quietboil/hdbtcl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Fhdbtcl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31921739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","hana","sap","tcl"],"created_at":"2025-10-07T04:05:39.894Z","updated_at":"2026-04-17T08:31:08.143Z","avatar_url":"https://github.com/quietboil.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HDBTCL\n\nHdbtcl is an extension to the Tcl language that provides access to SAP HANA database server. Hdbtcl uses C-level DBCAPI to interface with the HANA database.\n\n## Example\n\n```tcl\n# Need to tell tcl where hdbtcl can be loaded from.\n# Thus, unless it installed in one of the predefined locations\n# where packages are loaded from, ...\nlappend ::auto_path /usr/local/lib/tcl/hdbtcl\n\npackage require hdbtcl\n\n# Connect to the database\n# Note that for a single tenant databases (like HXE) database name\n# is not required. Otherwise -databaseName should be provided as well.\nset conn [hdb connect -serverNode localhost:39041 -uid JoeUser -pwd S3cr3tW0rd]\n\n# Reconfigure the connection to auto-commit all statements.\n# The default mode is \"no\" and requires explicit commit or rollback.\n$conn configure -autocommit yes\n\n# Execute a one-off statement\n$conn execute \"\n    CREATE TABLE employees (\n        id          INT NOT NULL PRIMARY KEY,\n        first_name  NVARCHAR(50) NOT NULL,\n        last_name   NVARCHAR(50) NOT NULL\n    )\n\"\n\n# Prepare a parameterized statement for repeatable executions\nset stmt [$conn prepare \"\n    INSERT INTO employees (id, first_name, last_name) VALUES (?, ?, ?)\n\"]\n\n# Execute INSERT multiple times\nforeach { id fn ln } { 2 \"Hasso\" \"Plattner\" } {\n    $stmt execute $id $fn $ln\n}\n\n# Disconnet from the database.\n# Note that this is not really required as hdbtcl will close the connection\n# and all open statements for that connection when the connection command is\n# no longer referenced.\n$conn close\n```\n\n## Building\n\n### Windows\n\n#### Prerequisites\n\nTo compile `hdbtcl` on Windows tcl and gcc must be present. `hdbtcl` build was tested\nwith tcl built from sources, ActiveTcl and Thomas Perschak's binary distributions of\ntcl 8.6. MinGW-W64 8.1.0 gcc (x86_64-win32-seh) was used to compile the extension.\n\n#### Building HDBTCL\n\n`win` directory contains the Makefile to build and test the extension. Before the build\nthe `local.mk` file, that Makefile will include, should be created to describe the build\nand test environment:\n```Makefile\nDBCAPI_INCLUDE_DIR := C:/Apps/SAP/hdbclient/node/src/h\nTCL   := C:/Apps/tcl86\nMINGW := C:/Apps/mingw\nCP    := cp\nRM    := rm -f\n\nHDBTCLTESTNODE := localhost:39041\nHDBTCLTESTUSET := TestUser\nHDBTCLTESTPASS := P4ssW0rd\nexport HDBCAPILIB := C:/Apps/SAP/hdbclient/libdbcapiHDB.dll\n```\nWhere:\n* `DBCAPI_INCLUDE_DIR` - directory where DBCAPI.h can be found.\n* `TCL` - root directory of the tcl installation.\n* `MINGW` - root directory where the MinGW gcc compiler installation.\n* `CP` - local \"copy\" command. Might need to be set to `copy`.\n* `RM` - local \"delete\" command. Might need to be set to `del /q`.\n* `HDBTCLTESTNODE` - HDB server address.\n* `HDBTCLTESTUSER` - HDB user name the test script will use to connect to HDB.\n* `HDBTCLTESTPASS` - the password for the above account.\n* `HDBCAPILIB` - full path to the `libdbcapiHDB.dll`.\n\n\u003e **Note** that `HDBCAPILIB` is only necessary if `libdbcapiHDB.dll` is not on the `PATH`.\n\u003e `hdbtcl` then loads it using `HDBCAPILIB` environment variable (hence the `export` BTW).\n\u003e Usually HDB client directory is not added to the PATH, therefore `HDBCAPILIB` would be\n\u003e routinely required.\n\nOnce `local.mk` is created, execute `make` to build or `make test` to build and run the `hdbtcl` test suite.\n\n### Unix\n\n`unix` directory contains the Makefile to build and test the extension. Before the build\nthe `local.mk` file, that Makefile will include, should be created to describe the build\nand test environment:\n```Makefile\nDBCAPI_INCLUDE_DIR := /opt/sap/hdbclient/node/src/h\n\nHDBTCLTESTNODE := hdbserver:39041\nHDBTCLTESTUSER := TestUser\nHDBTCLTESTPASS := P4ssW0rd\nexport HDBCAPILIB := /opt/sap/hdbclient/libdbcapiHDB.so\n```\nWhere:\n* `DBCAPI_INCLUDE_DIR` - directory where DBCAPI.h can be found.\n* `HDBTCLTESTNODE` - HDB server address.\n* `HDBTCLTESTUSER` - HDB user name the test script will use to connect to HDB.\n* `HDBTCLTESTPASS` - the password for the above account.\n* `HDBCAPILIB` - full path to the `libdbcapiHDB.so`.\n\n\u003e **Note** that `HDBCAPILIB` is only necessary if `libdbcapiHDB.so` is not in one of the\n\u003e `ld.so.conf` directories. `hdbtcl` then loads it using `HDBCAPILIB` environment variable\n\u003e (hence the `export` BTW). Usually HDB client directory is not added to the `ld.so.conf`,\n\u003e therefore `HDBCAPILIB` would be routinely required.\n\nOnce `local.mk` is created, execute `make` to build or `make test` to build and run the `hdbtcl` test suite.\n\n## Installation\n\n`hdbtcl` dynamic library and the accompanying `pkgIndex.tcl` can be added to one of the initial `auto_path` directories.\nIn that case `pkgIndex.tcl` would need to be merged with the `pkgIndex` at that location. Alternatively, `hdbtcl`\ndynamic library and the `pkgIndex.tcl` can be saved anywhere and that directory added to `auto_path` by the application\nthat uses `hdbtcl`.\n\n## Documentation\n\nThe complete [documentation][1] of the API offered by `hdbtcl` can be found in the [docs](docs) directory.\n\n## Final Note\n\nIt appears that at the moment 32-bit Windows version of `libdbcapiHDB.dll` might have some issues processing LOB data.\nNone of the LOB tests in `hdbtcl` test suite were successfull. The same tests complete successfully in 64-bit\nenvironments (on both Windows and Linux).\n\n[1]: \u003chttps://quietboil.github.io/hdbtcl\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquietboil%2Fhdbtcl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquietboil%2Fhdbtcl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquietboil%2Fhdbtcl/lists"}