{"id":19535613,"url":"https://github.com/miyako/4d-plugin-mdb","last_synced_at":"2025-02-26T04:16:42.272Z","repository":{"id":240622389,"uuid":"800574619","full_name":"miyako/4d-plugin-mdb","owner":"miyako","description":"mdb-tools for 4D.","archived":false,"fork":false,"pushed_at":"2024-05-24T02:05:21.000Z","size":15153,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T17:55:30.978Z","etag":null,"topics":["4d-plugin","mdbtools"],"latest_commit_sha":null,"homepage":"https://miyako.github.io/4d-plugin-mdb/","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/miyako.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-14T15:38:44.000Z","updated_at":"2024-05-24T02:05:25.000Z","dependencies_parsed_at":"2025-01-08T18:03:20.355Z","dependency_job_id":null,"html_url":"https://github.com/miyako/4d-plugin-mdb","commit_stats":null,"previous_names":["miyako/4d-plugin-mdb"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-mdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-mdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-mdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-mdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-plugin-mdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240788773,"owners_count":19857699,"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":["4d-plugin","mdbtools"],"created_at":"2024-11-11T02:19:19.647Z","updated_at":"2025-02-26T04:16:42.199Z","avatar_url":"https://github.com/miyako.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-20%2B-E23089)\n![platform](https://img.shields.io/static/v1?label=platform\u0026message=mac-intel%20|%20mac-arm\u0026color=blue)\n[![license](https://img.shields.io/github/license/miyako/4d-plugin-mdb)](LICENSE)\n![downloads](https://img.shields.io/github/downloads/miyako/4d-plugin-mdb/total)\n\n# 4d-plugin-mdb\n[mdb-tools](https://mdbtools.github.io) for 4D (Mac only).\n\n```4d\nstatus:=mdb sql(path;sql)\n```\n\nParameter|Type|Description\n------------|------------|----\npath|Text|POSIX path\nsql|Text|no `;` at the end. `[escape]` where necessary\nstatus|Object|\n\nProperties of ``status``:\n\nParameter|Type|Description\n------------|------------|----\nsuccess|Boolean|\nerrorMessage|Text|optional\nvalues|Collection|all values are text\n\n```4d\nstatus:=mdb export(path;table;output)\n```\n\nParameter|Type|Description\n------------|------------|----\npath|Text|POSIX path\ntable|Text|name\noutput|Text|POSIX path\nstatus|Object|\n\nthe generated file follows the `SQL EXPORT SELECTION` output format:\n\n* large Blob goes to ./BLOBS/Blob0.BLOB\n* large Picture goes to ./BLOBS/{name.extension}\n* main SQL\n  * table/field names are escaped\n  * Date includes default time\n  * Null is `NULL`\n  * Boolean is `0` or `1`\n  * Text is single quoted; single quotes are prefixed by an extra single quote; `\\r\\t\\n\\\"\\\\` are exported raw\n  * small Blobs \u0026 Pictures are exported as hex e.g. `X'01020304'`\n\n```sql\nINSERT INTO [Table_1] ( [Id] , [Field_2] , [Field_3] , [Field_4] , [Field_5] )\nVALUES (1 , INFILE 'BLOBS/Blob0.BLOB' , '2024/05/17 00:00:00:00' , '''abcd', INFILE 'BLOBS/Pic0.tif'),\n       (2 , INFILE 'BLOBS/Blob1.BLOB' , '2024/05/17 00:00:00:00' , '''efgh', X'54435034080000000000');\n```\n\nexcept, binary fields (`MDB_OLE` `MDB_BINARY` `MDB_REPID`) are always exported as hex.\n\nProperties of ``status``:\n\nParameter|Type|Description\n------------|------------|----\nsuccess|Boolean|\nerrorMessage|Text|optional\n\n```4d\nstatus:=mdb tables(path)\n```\n\nParameter|Type|Description\n------------|------------|----\npath|Text|POSIX path\nstatus|Object|\n\nProperties of ``status``:\n\nParameter|Type|Description\n------------|------------|----\nsuccess|Boolean|\nerrorMessage|Text|optional\ntables|Collection|\n\nProperties of ``table``:\n\nParameter|Type|Description\n------------|------------|----\nname|Text|\ntype|Text|system or user\ndescription|Text|optional\nfields|Collection|\n\nProperties of ``field``:\n\nParameter|Type|Description\n------------|------------|----\nname|Text|\ntype|Text|\ndescription|Text|optional\nautosequence|Boolean|optional\nautogenerate|Boolean|optional\nlength|Number|optional\nprecision|Number|optional\nscale|Number|optional\nproperties|Object|\n\n---\n\n## DDL for 4D SQL\n\nhttps://doc.4d.com/4Dv20R4/4D/20-R4/4D-SQL-engine-implementation.300-6778464.en.html\n\nAccess (mdb)|4D SQL||\n------------|------------|----\nMDB_BOOL|Boolean|Yes/No\nMDB_BYTE|Int|\nMDB_INT|Int|\nMDB_LONGINT|Int|\nMDB_MONEY|Real|Monetary data, stored with 4 decimal places of precision\nMDB_FLOAT|Real|\nMDB_DOUBLE|Real|\nMDB_DATETIME|Timestamp|Date/Time (8 bytes) or Date/Time Extended (Encoded string of 42 bytes)\nMDB_BINARY|Blob|Attachment\nMDB_TEXT|Text|Short Text (formerly known as “Text”)\nMDB_OLE|Blob|Pictures, graphs, or other ActiveX objects from another Windows-based application.\nMDB_MEMO|Text|Long Text (formerly known as “Memo”\nMDB_REPID|UUID|AutoNumber (16 bytes for ReplicationID)\nMDB_NUMERIC|Real|\nMDB_COMPLEX|Int|\n\nLarge Number (Int64) is not supported. see `data.c` for details.\n\n* `UNIQUE` `PRIMARY KEY` is deduced from index definition.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-mdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-plugin-mdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-mdb/lists"}