# \[ANN\] PostgresORM.jl: Object Relational Mapping for PostgreSQL

**URL:** <https://discourse.julialang.org/t/ann-postgresorm-jl-object-relational-mapping-for-postgresql/63847>\
**Category:** Package Announcements\
**Tags:** package, announcement, postgresql\
**Created:** [June 30, 2021, 5:34pm UTC](https://discourse.julialang.org/t/ann-postgresorm-jl-object-relational-mapping-for-postgresql/63847 "2021-06-30T17:34:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tencnivel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tencnivel/32/8662_2.png) [@tencnivel](https://discourse.julialang.org/u/tencnivel)\
**Post date:** [June 30, 2021, 5:34pm UTC](https://discourse.julialang.org/t/ann-postgresorm-jl-object-relational-mapping-for-postgresql/63847/1 "2021-06-30T17:34:32Z")

</div>

I’m happy to announce [PostgresORM.jl](https://github.com/JuliaPostgresORM/PostgresORM.jl), a Julia ORM for PostgreSQL.

This package was developed to help us create Julia based web applications.  
Before this public release, it has been used in production for over a year in various projects and in particular in two large web applications of our clients that are critical to them.  
This to say that it covers quite a lot of use cases but not any possible use case for now.

It features the following:

**CRUD functions**

- ‘Create’ functions: `create_entity!`, `create_in_bulk_using_copy`
- ‘Retrieve’ functions: `retrieve_entity`, `retrieve_one_entity`, `execute_plain_query`, `execute_query_and_handle_result`
- ‘Update’ functions: `update_entity!`, `update_vector_property!`
- ‘Delete’ functions: `delete_entity`, `delete_entity_alike`

**Reverse engineering**  
There is a reverse enginnering function `generate_julia_code` that creates the Julia structs, mappings and enums from the PostgreSQL database

**Tracking of modifications**  
This can be activated on a per-class basis. It will serialize the changes of the instances in the designated ‘modifications’ table.

**Handling of non trivial use-cases**

- Composed primary keys
- Mutable composite types can be used as ID property
