-
Notifications
You must be signed in to change notification settings - Fork 0
PostgreSQL Producer
The PostgreSQL Producer is a persistence code generator: it translates a CodeModeler model into a database running on PostgreSQL Server 8.4 and upper. The database is created by generating SQL scripts which are then automatically ran on the configured server.
It relies on the Npgsql package. Depending on context, the producer may alsorequires the libossp-uuid package to be installed on the server. With a Linux server, the postgresql-contrib package may also be needed.
As other producers, to add it, you must click on the “Add New Producer” context menu of the Producers folder node:
You need to configure the generated classes to use PostgreSQL as persistence layer (“persistenceTypeName” attribute) and set a connection string indicating them where to connect to (“connectionString” attribute). Here's a sample configuration for a sample application named Northwind:
<configSections>
<section name="Northwind" type="CodeModeler.Runtime.CodeModelerConfigurationSectionHandler, CodeModeler.Runtime" />
</configSections>
<Northwind persistenceTypeName="PostgreSQL"
connectionString="Server=localhost;Database=PostgreSQL_Test;User Id=postgres;Password=yourpassword;"
postgresql-defaultSchema="public"
postgresql-useParameterCache="true" />
Notes:
-
postrgresql-defaultSchema and postgresql-useParameterCache are optional and their respective default values are "public" and "true".
-
The default schema defines the schema to be used when an entity doesn't have a schema. By default, the "public" schema is used.
-
The postgresql-useParameterCache attribute allows you to disable the use of the parameter cache system which stores lists of parameters for each stored procedure that is used.
The following features are supported:
-
Generating schemas and cross-schemas relations
-
Generating tables
-
Generating constraints (primary keys and foreign keys)
-
Generating sequences for auto-incremented columns
-
Generating views
-
Generating stored procedures (using SQL or PL/pgSQL)
-
Generating instances
-
Saving instances
-
Saving Binary Large Objects (BLOB) instances in bytea columns
The following features are not supported:
-
CMQL Search methods
-
Differential engine
- Introduction
- Architect Guide
- Concepts
- Using Visual Studio
- Overview
- Creating a CodeModeler Project
- Visual Environment
- Project Hierarchy
- Design Surface
- Customizing Design Surfaces
- Ribbon Bar
- Property Grid
- Member Format Expressions
- Model Grid
- Method Editor
- View Editor
- Instance Editor and Grid
- Resources Editor
- Inferred Model Viewer
- Building
- Project Physical Layout
- Source Control Support
- Generating
- Aspect Oriented Design (AOD)
- Developer Guide
- The Business Object Model (BOM)
- CodeModeler Query Language (CMQL)
- Starting Guide - Tutorial
- Upgrade From CFE