Skip to main content

RATE_LIMIT_COUNTERS_SQL

Constant RATE_LIMIT_COUNTERS_SQL 

Source
pub const RATE_LIMIT_COUNTERS_SQL: &str = "CREATE TABLE IF NOT EXISTS rate_limit_counters (\
key TEXT PRIMARY KEY, \
window_start INTEGER NOT NULL, \
count INTEGER NOT NULL);";
Expand description

The forward-only DDL for the rate_limit_counters table the upsert below counts in. A venture wiring .d1_rate_limiter(..) ships this as a migration in its migrations/ directory, next to the module SQL.