{"id":19903479,"url":"https://github.com/zdavatz/odba","last_synced_at":"2025-08-20T16:20:38.054Z","repository":{"id":11614345,"uuid":"14110281","full_name":"zdavatz/odba","owner":"zdavatz","description":"Object Database Access - Ruby Software for ODDB.org Memory Management","archived":false,"fork":false,"pushed_at":"2025-06-29T12:33:06.000Z","size":1163,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-28T06:16:13.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zdavatz.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-11-04T13:26:33.000Z","updated_at":"2025-06-29T12:33:12.000Z","dependencies_parsed_at":"2025-05-03T00:31:23.837Z","dependency_job_id":"7ef8fb48-3ef4-4b3b-91ed-135b86b4fb11","html_url":"https://github.com/zdavatz/odba","commit_stats":{"total_commits":282,"total_committers":24,"mean_commits":11.75,"dds":0.6914893617021276,"last_synced_commit":"a8b0e37284dbb77436cc21248ff0905e187163b7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zdavatz/odba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdavatz%2Fodba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdavatz%2Fodba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdavatz%2Fodba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdavatz%2Fodba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdavatz","download_url":"https://codeload.github.com/zdavatz/odba/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdavatz%2Fodba/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271347060,"owners_count":24743755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"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":[],"created_at":"2024-11-12T20:23:57.639Z","updated_at":"2025-08-20T16:20:38.004Z","avatar_url":"https://github.com/zdavatz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# odba\n\nODBA is an unintrusive Object Cache system. It adresses the crosscutting \nconcern of object storage by disconnecting and serializing objects into \nstorage. All disconnected connections are replaced by instances of \nODBA::Stub, thus enabling transparent object-loading.\n\n\n* https://github.com/zdavatz/odba\n\nTo see a graphical overview of the Library please see\n\n* https://raw.githubusercontent.com/zdavatz/odba/master/odba.jpeg\n\n## ODBA supports\n\n * transparent loading of connected objects\n * index-vectors\n * transactions\n * transparently fetches Hash-Elements without loading the entire Hash\n\n## DESCRIPTION:\n\n* Object Database Access - Ruby Software for ODDB.org Memory Management\n* https://dev.ywesee.com/ODBA/Index\n\n## FEATURES/PROBLEMS:\n\n* There may still be an sql bottleneck. Has to be investigated further.\n* You will need postgresql installed.\n* The unit test test_clean__prefetched in test/test_cache.rb fails with Ruby 3.3/3.4 sometimes but not always\n* Rework the unit tests to use a test database and less flexmock\n* Rebase the library on the Sequel gem instead of ydbi/ydbd_pg\n\n## Example\n\nYou may find this code and some tests which is using this (example)[https://github.com/zdavatz/odba/blob/master/test/example.rb]\n    \n    require \"odba/connection_pool\"\n\n    class User\n      attr_accessor :first_name, :last_name\n      include ODBA::Persistable\n      def initialize(first_name, last_name)\n        @first_name = first_name\n        @last_name = last_name\n      end\n\n      def to_s\n        \"#{@first_name} #{@last_name}\"\n      end\n    end\n\n    class Example\n      def self.db_setup\n        # connect default storage manager to a relational database  on\n        # our localhost using port 5435 with a user odba_test and an empty password\n        ODBA.storage.dbi = ODBA::ConnectionPool.new(\"DBI:Pg:dbname=odba_test;host=127.0.0.1;port=5432\", \"odba_test\", \"\")\n        ODBA.cache.setup\n      end\n\n      def self.show_last_added_user\n        res = ODBA.storage.dbi.select_all(\"Select count(*) from object;\").first.first\n        odba_id = ODBA.storage.dbi.select_one(\"select odba_id from object order by odba_id desc limit 1;\")\n        puts \"show_last_added_user: We have  #{res} objects. Highest odba_id is #{odba_id}\"\n        first = ODBA.storage.dbi.select_one(\"select odba_id, name, prefetchable, extent, content from object order by odba_id desc limit 1;\")\n        puts \"  DB-content is #{first}\"\n        puts \"  Fetched object for odba_id #{odba_id} is #{ODBA.cache.fetch(odba_id.first)}\"\n      end\n    end\n\n    Example.db_setup\n    composer = User.new(\"Ludwig\", \"Van Beethoven\")\n    composer.odba_store\n    Example.show_last_added_user\n    painter = User.new(\"Vincent\", \"Van Gogh\")\n    painter.odba_store\n    scientist = User.new(\"Albert\", \"Einstein\")\n    scientist.odba_store\n    Example.show_last_added_user\n\nYou will see something like\n\n    show_last_added_user: We have  2 objects. Highest odba_id is [2]\n      DB-content is [2, nil, false, \"User\", \"04086f3a09557365720b3a104066697273745f6e616d6549220b4c7564776967063a0645543a0f406c6173745f6e616d6549221256616e2042656574686f76656e063b07543a15406f6462615f70657273697374656e74543a0d406f6462615f696469073a14406f6462615f6f6273657276657273303a13406f6462615f707265666574636830\"]\n      Fetched object for odba_id [2] is Ludwig Van Beethoven\n    show_last_added_user: We have  4 objects. Highest odba_id is [4]\n      DB-content is [4, nil, false, \"User\", \"04086f3a09557365720b3a104066697273745f6e616d6549220b416c62657274063a0645543a0f406c6173745f6e616d6549220d45696e737465696e063b07543a15406f6462615f70657273697374656e74543a0d406f6462615f696469093a14406f6462615f6f6273657276657273303a13406f6462615f707265666574636830\"]\n      Fetched object for odba_id [4] is Albert Einstein\n      \n\nThis example is run on each push to github via the (github action)[https://github.com/zdavatz/odba/blob/master/.github/workflows/devenv.yml]. It is based on (devenv.sh)[https://devenv.sh/], which ensures reproducability.\n\n## INSTALL:\n\n* gem install odba\n\n## DEVELOPERS:\n\n* Masamoi Hatakeyama\n* Zeno R.R. Davatz\n* Hannes Wyss (up to Version 1.0)\n* Niklaus Giger (Porting to Ruby 2.x and 3.x, cleanup)\n\n## LICENSE:\n\n* GPLv2.1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdavatz%2Fodba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdavatz%2Fodba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdavatz%2Fodba/lists"}