Detects the right CollegeDB shard provider for an arbitrary binding.
This removes the per-app "is this a D1 binding, a Drizzle client, or a raw
SQLite client?" wiring that every consumer otherwise rewrites. Resolution
order:
A raw Drizzle client (run/all/get/execute) is wrapped with
createDrizzleSQLProvider when options.sql is supplied.
A value already implementing the SQLDatabase contract (a D1
binding, or a provider from any create*Provider) is returned as-is.
Detects the right CollegeDB shard provider for an arbitrary binding.
This removes the per-app "is this a D1 binding, a Drizzle client, or a raw SQLite client?" wiring that every consumer otherwise rewrites. Resolution order:
run/all/get/execute) is wrapped with createDrizzleSQLProvider whenoptions.sqlis supplied.create*Provider) is returned as-is.prepare(sql)is wrapped with createSQLiteProvider.null(unrecognized).