{"id":21969464,"url":"https://github.com/rnett/exposeddaogen","last_synced_at":"2025-09-13T22:16:26.044Z","repository":{"id":67429747,"uuid":"137007566","full_name":"rnett/ExposedDaoGen","owner":"rnett","description":"Kotlin Exposed code generator.","archived":false,"fork":false,"pushed_at":"2019-01-03T23:52:28.000Z","size":11512,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T00:58:45.255Z","etag":null,"topics":["code-generation","dao","kotlin","kotlin-multiplatform","kotlin-serialization","orm","sql"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/rnett.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":"2018-06-12T02:41:20.000Z","updated_at":"2023-09-07T21:07:28.000Z","dependencies_parsed_at":"2023-06-11T01:30:41.314Z","dependency_job_id":null,"html_url":"https://github.com/rnett/ExposedDaoGen","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rnett/ExposedDaoGen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnett%2FExposedDaoGen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnett%2FExposedDaoGen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnett%2FExposedDaoGen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnett%2FExposedDaoGen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnett","download_url":"https://codeload.github.com/rnett/ExposedDaoGen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnett%2FExposedDaoGen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275034458,"owners_count":25394051,"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-09-13T02:00:10.085Z","response_time":70,"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":["code-generation","dao","kotlin","kotlin-multiplatform","kotlin-serialization","orm","sql"],"created_at":"2024-11-29T14:20:48.567Z","updated_at":"2025-09-13T22:16:26.017Z","avatar_url":"https://github.com/rnett.png","language":"Kotlin","readme":"![Version 2.0.0](https://img.shields.io/badge/version-2.0.0-green.svg)\n\n# Exposed DAO Code Generator\n\nA code generator for Kotlin [Exposed](https://github.com/JetBrains/Exposed).\n\nIt is designed to work with PostgreSQL.  It may work with other vendors (reports of working/not working are welcome).\n\nIf you want to try to adapt it to a different vendor,\nlook at the Type class and its uses, it is the only vendor dependant part.\n\nError reports / issues are welcome, but there is no guarantee I will get to it.\nThis isn't something I'm supporting, just something I use that might be useful.\n\n# Features\n\n * KotlinX Serializer generation (saved fields on serialization, loads from database on deserializiation)\n * Multiplatform support (with cross-platform capable serialization for easy data transfer)\n * Foreign and Referencing Keys\n * Optional assume nullable unless explcit `not null`\n * Imports and package statement\n * Export to class/package structure\n * `new` pesudo-Constructor that takes fields as arguments\n * Customizable names, mutability\n\n# Limitations\n\n * Some data types\n * Anything Non-postgres\n * Must have one primary key that is an int or long type if you want DAO (DSL will still be generated)\n\n# Usage\n\n## GUI (ExposedDaoGenerator.jar)\n\nDownload the ExposedDaoGenerator.jar.  Run it.\n\nSupports package names, save/load, import/export, and export to files (a file per table).\n\nAlso supports Kotlin multiplatform projects\n(generates a common class, a JS class that will work on other platforms, and the JVM class with the exposed backend).\n\n#####  UI is somewhat buggy, but as long as you don't try to break it you should be allright.\nIssues and feedback are appreciated.\n\nTo start, hit File -\u003e New or `CTRL-N` to create a new database from a connection string.\n\nUse the left panel to select tables and columns/foreign keys.\n\nYou can change the names of the columns and keys, and make the class properties mutable.\n\n**Some names will cause errors in the code**.  I plan to detect this, but its not in yet.\n\nI plan to add the ability to change the type, and to exclude columns.\n\n### Usage\n\nTo change settings, use `CTRL-SHIFT-O`.\n\nYou can save your (edited) database to a .daogen file using File -\u003e Save or `CTRL-S`.\n\nTo change the save file, use File -\u003e Save As or `CTRL-SHIFT-S`.\n\nTo open a saved file, use File -\u003e Open or `CTRL-O`.\n\nTo export the generated code to a .kt file, use `CTRL-E`.\n\nTo change the export file, use `CTRL-SHIFT-E`.\n\nTo import the database from an exported file, use `CTRL-I`.\n\nTo export to files, use `CTRL-ALT-E`.\n\nIf Autosave is checked, the database will automatically be saved to the save file when any changes are made (if the save file is set).\n\nIf Auto Export is checked, the database will automatically be exported to the export file when any changes are made (if the export file is set).\n\nThey are both checked by default when the information is available.\n\n## Command Line (daogen.jar)\n\nDownload daogen.jar or build with gradle.\nThe jar is /libs/daogen.jarif you build with gradle.\n\n\nRun with the command arguments: `\u003cconnectionString\u003e [-p package] [-f outFile] [-s schema] [-tables tablesCSVList] [-nodao] [-noserialize] [-multiplatform JVM/JS/Common] [-cc] [-q]`\n * `connectionString` is the JDBC connection string.  **[MANDATORY]**\n * `package` is the package to put in the package statement.  Optional, **must be preceded by -p**\n * `outFile` is the file to output to.  Default is not to output the generated code to a file.  Optional, **must be preceded by -f**\n * `schema` is schema to look at.  Default is all of them.  Optional, **must be preceded by -s**\n * `tablesCSVList` is the list of tables, separated by commas, to look at.  Default is all of them.  Optional, **must be preceded by -tables**\n * `-nodao` means not to generate DAO (classes), just DSL (objects).  Optional.\n * `-noserialize` means not to generate KotlinX Serializers.  Optional.\n * `-multiplatform` optionally generates the DAO for a multiplatform project's platform.\n `-multiplatform` can be followed by `JVM`, `JS`, or `Common`, which causes daogen to output for that platform.\n Note that specifying `JVM` here is different than no multiplatform at all; with `JVM`, `actual` statements will be included.\n * `-cc` means to copy the generated code to the clipboard.  Optional.\n * `-q` means to run in quiet mode without outputting the generated code.  Optional.\n\n\nTo see the version of the jar, use `--version`.\n\n\n## TODO / Does not support\n * Quoted names in Postgres\n * Better naming\n * Support for more ids / primary keys (dependent on Exposed [mostly])\n * via\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnett%2Fexposeddaogen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnett%2Fexposeddaogen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnett%2Fexposeddaogen/lists"}