stablekernel / postgresql-dart

Dart PostgreSQL driver: supports extended query format, binary protocol and statement reuse.
https://www.dartdocs.org/documentation/postgres/latest
BSD 3-Clause "New" or "Revised" License
129 stars 32 forks source link

define PostgreSQL schema names for a connection #116

Closed insinfo closed 4 years ago

insinfo commented 4 years ago

I am migrating a server side application written in PHP with Slim Framework and Eloquent ORM to dart and Arqueduct and PostgreSQL and I have not found how to define the names of the schemas that I will use in the application as I did in Eloquent.


///My class migrated from PHP
 DBConnectionInfo(
          host: env['DB_HOST'],
          database: env['DB_NAME'],
          port: 5432,
          username: env['DB_USERNAME'],
          password: env['DB_PASSWORD'],
          charset: 'utf8',
          schema: ['pmro_padrao', 'jubarte', 'ciente', 'portal_rh', 'jubarte_app', 'faq'],
        );

PostgreSQLConnection(
        connectionInfo.host,
        connectionInfo.port,
        connectionInfo.database,
        username: connectionInfo.username,
        password: connectionInfo.password,
        schema ? ? ? ? ? ? ? ?
      );
isoos commented 4 years ago

@insinfo: I think you don't need to specify the schema, maybe it was only part of something in PHP.