postgres_db_writer

class mysql2pgsql.lib.postgres_db_writer.PostgresDbWriter(db_options, verbose=False)

Class used to stream DDL and/or data from a MySQL server to a PostgreSQL.

Parameters :
  • db_options: dict containing connection specific variables
  • verbose: whether or not to log progress to stdout
class FileObjFaker(table, data, processor, verbose=False)

A file-like class to support streaming table data directly to pscopg2.copy_from().

Parameters :
PostgresDbWriter.close()

Closes connection to the PostgreSQL server

PostgresDbWriter.truncate(*args, **kwargs)

Send DDL to truncate the specified table

Parameters :

Returns None

PostgresDbWriter.write_constraints(*args, **kwargs)

Send DDL to create the specified table constraints

Parameters :

Returns None

PostgresDbWriter.write_contents(*args, **kwargs)

Write the contents of table

Parameters :

Returns None

PostgresDbWriter.write_indexes(*args, **kwargs)

Send DDL to create the specified table indexes

Parameters :

Returns None

PostgresDbWriter.write_table(*args, **kwargs)

Send DDL to create the specified table

Parameters :

Returns None

Previous topic

mysql_reader

Next topic

postgres_file_writer

This Page