generatePgGrpcService function

Future<bool> generatePgGrpcService(
  1. PostgreSQLConnection connection, {
  2. String? path,
  3. String? subPath,
  4. bool schemaInName = true,
  5. String? schema,
  6. String? tableName,
})

Looad a connection to Postgres Database and automatically generates grpc service for all tables of target database

Include "path" named parameter to specify the local path to generateds files

Include "schemaInName" named parameter if you want supress the schame name of table in generateds files and class names of thats files

Implementation

Future<bool> generatePgGrpcService(PostgreSQLConnection connection,
    {String? path,
    String? subPath,
    bool schemaInName = true,
    String? schema,
    String? tableName}) async {
  try {
    await _generateService(
      connection,
      (await _getTables(connection, schema: schema, tableName: tableName)),
      schemaInName,
      path: path,
      subPath: subPath,
    );

    return true;
  } finally {}
}