{"id":27854863,"url":"https://github.com/genaker/mage-db2","last_synced_at":"2025-05-04T09:59:28.207Z","repository":{"id":265154147,"uuid":"895297505","full_name":"Genaker/mage-db2","owner":"Genaker","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-27T05:50:44.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-04T09:59:18.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Genaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-28T00:03:58.000Z","updated_at":"2025-03-27T05:50:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"6076b07e-10ac-40a2-9528-9e4160608ddd","html_url":"https://github.com/Genaker/mage-db2","commit_stats":null,"previous_names":["genaker/mage-db2"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genaker%2Fmage-db2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genaker%2Fmage-db2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genaker%2Fmage-db2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genaker%2Fmage-db2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Genaker","download_url":"https://codeload.github.com/Genaker/mage-db2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252317081,"owners_count":21728526,"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","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":"2025-05-04T09:59:27.566Z","updated_at":"2025-05-04T09:59:28.198Z","avatar_url":"https://github.com/Genaker.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# install \n\n```\ncomposer require mage/db2\n```\nIf you have any conflicts, you can use:\n\n```\ncomposer require mage/db2 --with-all-dependencies --ignore-platform-reqs --prefer-source --no-scripts\n\n```\nuse  Mage\\DB2\\DB2;\n\n$isReturningCustomer = DB2::table('sales_order')\n            -\u003ewhere('customer_id', $customerId)\n            -\u003ewhere('entity_id', '\u003c', $entityId)\n            -\u003eexists();\n```\n\n```\nDB2::table('sales_order')-\u003ewhere('customer_id', 123)-\u003eget();\n```\n\nQuery product images with product details using DB2:\n```\n            $images = DB2::table('catalog_product_entity_media_gallery as main_table')\n                -\u003ejoin(\n                    'catalog_product_entity_media_gallery_value as mgv',\n                    'mgv.value_id',\n                    '=',\n                    'main_table.value_id'\n                )\n                -\u003ejoin(\n                    'catalog_product_entity as e',\n                    'e.entity_id',\n                    '=',\n                    'mgv.entity_id'\n                )\n                -\u003eselect([\n                    'main_table.value_id',\n                    'main_table.attribute_id',\n                    'main_table.value',\n                    'main_table.media_type',\n                    'main_table.disabled',\n                    'e.sku'\n                ])\n                -\u003ewhere('main_table.media_type', '=', 'image')\n                -\u003ewhere('main_table.disabled', '=', 0)\n                -\u003eorderBy('main_table.value_id', 'ASC')\n                -\u003eget();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenaker%2Fmage-db2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenaker%2Fmage-db2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenaker%2Fmage-db2/lists"}