{"id":22404779,"url":"https://github.com/jdeurt/n4jmock","last_synced_at":"2025-03-27T01:17:27.750Z","repository":{"id":192157413,"uuid":"686174938","full_name":"jdeurt/n4jmock","owner":"jdeurt","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-05T22:56:46.000Z","size":249,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T06:42:48.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/jdeurt.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}},"created_at":"2023-09-02T00:03:51.000Z","updated_at":"2023-09-02T00:07:54.000Z","dependencies_parsed_at":"2023-09-03T01:45:27.465Z","dependency_job_id":null,"html_url":"https://github.com/jdeurt/n4jmock","commit_stats":null,"previous_names":["jdeurt/n4jmock"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeurt%2Fn4jmock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeurt%2Fn4jmock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeurt%2Fn4jmock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeurt%2Fn4jmock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdeurt","download_url":"https://codeload.github.com/jdeurt/n4jmock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245761302,"owners_count":20667895,"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":"2024-12-05T10:15:09.662Z","updated_at":"2025-03-27T01:17:27.732Z","avatar_url":"https://github.com/jdeurt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# n4jmock\n\nA DSL for mocking N4J data.\n\nLanguage support for VSCode is available here: https://github.com/jdeurt/n4jm-language-support.\n\n## Usage\n\n`$ n4jm ./test -o=./test.cypher`\n\n```dart\n// Abstract labels do not get their own node\n// but are inherited by their children\nabstract Animal {\n    id: string @uuid\n    name: string\n    beepBoop: string @binary\n}\n```\n\n```dart\n// Cat inherits all properties and relationships\n// of Animal\nCat : Animal {\n    breed: string\n\n    chases -\u003e [Mouse]\n}\n```\n\n```dart\nDog : Animal {\n    breed: string\n\n    // A relationship can target more than one label\n    chases -\u003e [Cat, Mouse]\n}\n```\n\n```dart\n// Enums define a collection of values from which\n// the transpiler can randomly pick from\nenum MouseFood {\n    cheese\n}\n\nenum UnusedForTheSakeOfExample {\n    Hello // Inferred as \"Hello\"\n    \"World\" // A string literl\n    42.0 // A floating point literal\n    42 // An integer literal\n}\n\nMouse : Animal {\n    eats: MouseFood\n}\n```\n\nOutputs\n\n```\nCREATE (mouse_0:Mouse:Animal)\nSET mouse_0.eats = 'cheese'\nSET mouse_0.id = 'a2223187-0508-4e02-aca7-075416b6b383'\nSET mouse_0.name = 'yPUWoZOChN'\nSET mouse_0.beepBoop = '0b1001101010'\nCREATE (dog_0:Dog:Animal)\nSET dog_0.breed = 'd3geXC1xWL'\nSET dog_0.id = 'e9d68de7-709e-4ac1-afa5-b983c2b69f95'\nSET dog_0.name = '8wMPyIHvye'\nSET dog_0.beepBoop = '0b0100111000'\nCREATE (cat_0:Cat:Animal)\nSET cat_0.breed = '4EspCAGAOh'\nSET cat_0.id = '54712a62-1b03-4f05-85c8-2f4f04d9ee85'\nSET cat_0.name = 'bseutnlRBX'\nSET cat_0.beepBoop = '0b1100100101'\nMATCH (dog_1:Dog), (cat_1:Cat)\nCREATE (dog_1)-[:chases]-\u003e(cat_1)\nMATCH (dog_2:Dog), (mouse_1:Mouse)\nCREATE (dog_2)-[:chases]-\u003e(mouse_1)\nMATCH (cat_2:Cat), (mouse_2:Mouse)\nCREATE (cat_2)-[:chases]-\u003e(mouse_2)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdeurt%2Fn4jmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdeurt%2Fn4jmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdeurt%2Fn4jmock/lists"}