{"id":38095240,"url":"https://github.com/henryhamon/cosfaker","last_synced_at":"2026-01-16T21:00:58.798Z","repository":{"id":48954104,"uuid":"78768340","full_name":"henryhamon/cosfaker","owner":"henryhamon","description":"Fake data for Intersystems Caché","archived":false,"fork":false,"pushed_at":"2021-07-03T17:15:07.000Z","size":819,"stargazers_count":8,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-04-11T05:36:08.630Z","etag":null,"topics":["cache-objectscript","cos","ensemble","faker","intersystems","intersystems-cache","iris","unittest","unittesting"],"latest_commit_sha":null,"homepage":null,"language":"ObjectScript","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/henryhamon.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}},"created_at":"2017-01-12T17:14:46.000Z","updated_at":"2023-03-05T02:19:56.000Z","dependencies_parsed_at":"2022-09-06T06:01:27.187Z","dependency_job_id":null,"html_url":"https://github.com/henryhamon/cosfaker","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/henryhamon/cosfaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryhamon%2Fcosfaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryhamon%2Fcosfaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryhamon%2Fcosfaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryhamon%2Fcosfaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henryhamon","download_url":"https://codeload.github.com/henryhamon/cosfaker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henryhamon%2Fcosfaker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cache-objectscript","cos","ensemble","faker","intersystems","intersystems-cache","iris","unittest","unittesting"],"created_at":"2026-01-16T21:00:57.929Z","updated_at":"2026-01-16T21:00:58.749Z","avatar_url":"https://github.com/henryhamon.png","language":"ObjectScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cosFaker [![GitHub issues](https://img.shields.io/github/issues/henryhamon/cosfaker.svg)](https://github.com/henryhamon/cosfaker/issues) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/henryhamon/cosfaker/master/LICENSE)\nGenerate massive amounts of fake data for Intersystems IRIS\n\nThe language of data is according to configuration of your Caché (Now works with Pt-Br and En-Us(Default)).\n\n## Valid Types\n* Address (Street, Latitude, Longitude, City, State, Capital, Country, Street Suffix, Street Prefix, Postcode, Secondary Address)\n* App (Function name)\n* Coffee (Blend name, Variety, Notes, Origin)\n* Color (Hexadecimal, Name, RGB)\n* Commerce (Price, CNPJ, Color, Product, Product Name, Promotion Code)\n* Company (Profession, Industry)\n* Dates (Forward, Backward)\n* DragonBall (Character)\n* File (Filename, Extension, MimeType)\n* Finance (Amount, Credit Card, Bitcoin Address)\n* Game (Card, Mortal Kombat, Street Fighter)\n* Internet (Username, Email, Protocol, Domain Word, Domain Name, Avatar, Url, Slug, IPV4, IPV6,MAC Address)\n* Job (Title, Skills, Field)\n* Lorem (Words, Sentences, Paragraphs, Lines, Text, Hipster)\n* Name (First name, Last Name, Full Name, Suffix)\n* Person (CPF (Brazilian ID))\n* Phone (Area code, Phone number, Cell phone)\n* Pokemon (Pokemons)\n* StarWars (Character, Droid, Planet, Quote, Specie, Vehicle, Wookie word, Wookie Sentence)\n* UFC (Category, Fighter, Fighter by category, Nickname)\n\n## Instalation\n\nTo install cosFaker, you just need to import the package cosFaker.vX.X.X.xml file.\nYou can go to Management Portal -\u003e System Explorer -\u003e Classes -\u003e Import and select the XML file or just drag the file over Studio.\nAlso, if you like terminal like me, execute:\n\n```\nDo $system.OBJ.Load(\"yourpath/cosFaker.vX.X.X.xml\",\"ck\")\n```\n\n### Docker ###\n\nTo install using Docker. Follow this instructions:\n\nOpen terminal and clone/git pull the repo into any local directory\n\n```\n$ git clone https://github.com/henryhamon/cosfaker.git\n```\n\nOpen the terminal in this directory and run:\n\n```\n$ docker-compose build\n```\n\nRun the IRIS container with your project:\n```\n$ docker-compose up -d\n```\n\n## How to Run the Application\nOpen InterSystems IRIS terminal:\n\n```\n$ docker-compose exec iris iris session iris\nUSER\u003ezn \"IRISAPP\"\nIRISAPP\u003eWrite ##class(cosFaker.Name).FullName()\n```\n\n## Usage\n\n### On Populate\n\nYou can use on Populate event\n\n```cos\nMethod OnPopulate() As %Status [ ServerOnly = 1 ]\n{\n\tSet ..Login = ##class(cosFaker.Internet).UserName(\"John\",\"Doe\")\n\tSet ..Url = ##class(cosFaker.Internet).DomainWord()\n}\n```\nOr on a simple Set\n\n```cos\nSet ..Name = ##class(cosFaker.Name).FullName()\n```\n\n### SQL Class\n\nYou can generate data directly on a table\n\n```cos\nDo ##class(cosFaker.SQL).Insert(\"Sample_Data.Clients\",\"City,Name,Salary\",\"city SC,name 2,price 1000 2000 2 R$\",2)\n//Same as:\n//INSERT INTO Sample_Data.Clients (City,Name,Salary) VALUES ('Celso Ramos','Luiggi Dias Nunes Saraiva','R$1654.30')\n//INSERT INTO Sample_Data.Clients (City,Name,Salary) VALUES ('Nova Veneza','Fabiano da Costa','R$1255.13')\n```\n\n### JSON Class\n\nYou can generate data on JSON string or in an object, only passing a JSON string as shown above.\n\nExamples showing JSON strings populated:\n```cos\nWrite ##class(cosFaker.JSON).GetDataJSONFromJSON(\"{Nome:'name 2',Cidade:'city SC',CPF:'cpf 1',Description:'slug \"\"person sample example\"\" ;'}\")\n// {\n//    \"CPF\":\"661.254.048-62\",\n//    \"Cidade\":\"Brunópolis\",\n//    \"Nome\":\"Jonathan Ribeiro Ribeiro\",\n//    \"Description\":\"person;sample;example\"\n// }\n```\n\n```cos\n//Suppose you want a person with name, street, phone and his 3 preferred Pokemons\nWrite ##class(cosFaker.JSON).GetDataJSONFromJSON(\"{person:['name','street','phone','3 pokemon']}\")\n// {\"person\":\n//           [\n//              \"Yango Nogueira\",\n//              \"Viela General Sirineu Nogueira\",\n//              \"(44) 0968-2926\",\n//              [\"Bayleef\",\"Haunter\",\"Golurk\"]\n//           ]\n// }\n```\n\nAnd example showing Object populated:\n```cos\nSet person = ##class(cosFaker.JSON).GetDataOBJFromJSON(\"{name:'name 2',birth:'date',profession:'profession',pokemons:'3 pokemon'}\",.tSC)\n\nWrite person.name\n// Flávio Silveira\n\nSet listOfPokemons = person.pokemons\nWrite listOfPokemons.GetAt(1)\n// Diancie\n\nWrite listOfPokemons.Count()\n// 3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenryhamon%2Fcosfaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenryhamon%2Fcosfaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenryhamon%2Fcosfaker/lists"}