Skip to contents

An internal function to determine the version of CohortMethod used to store results

Usage

.getCmVersion(connectionHandler, schema, cmTablePrefix = "cm_")

Arguments

connectionHandler

A connection handler that connects to the database and extracts sql queries. Create a connection handler via `ResultModelManager::ConnectionHandler$new()`.

schema

The result database schema (e.g., 'main' for sqlite)

cmTablePrefix

The prefix used for the cohort method results tables

Value

A integer with the major version number of cohort method

Details

Specify the connectionHandler, the schema and the prefixes. This query will attempt to identify if CohortMethod v6 was used by inspecing the migration table. When the migration_order is >= 3 then v6 of CohortMethod was used.