TdsCdc.Connection.Ecto (tds_cdc v0.1.0)

Copy Markdown

Connection adapter that uses an existing Ecto.Repo for database queries.

This allows TdsCdc to share the connection pool with the rest of the application, avoiding the need for a separate TDS connection.

Requirements

The repo must be configured with the tds_ecto adapter and already started as part of the application's supervision tree.

Example

# In your application supervision tree:
children = [
  MyApp.Repo,
  {TdsCdc.Client, repo: MyApp.Repo, capture_instances: ["dbo_users"]}
]

# Or at runtime:
TdsCdc.start_link(
  repo: MyApp.Repo,
  capture_instances: ["dbo_users"]
)