SqlDialect
Defined in: src/analytics/sql.ts:39
Column expressions and engine quirks for one backend.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
amount |
string |
- | src/analytics/sql.ts:47 |
atMillis |
string |
Expression yielding the event time in epoch millis (for ordering). | src/analytics/sql.ts:57 |
data |
string |
Column holding the full event JSON. | src/analytics/sql.ts:49 |
dims |
Record<AnalyticsDimension, string> |
Column per dimension, holding dimensionValue. | src/analytics/sql.ts:51 |
id |
string |
- | src/analytics/sql.ts:44 |
isBot |
string |
Expression truthy for bot clicks (bot = 1). |
src/analytics/sql.ts:46 |
table |
string |
Quoted table reference. | src/analytics/sql.ts:41 |
tenant |
string |
- | src/analytics/sql.ts:42 |
type |
string |
- | src/analytics/sql.ts:43 |
uniques? |
string |
Distinct-visitor expression, when the backend counts uniques. | src/analytics/sql.ts:61 |
weight |
string |
Row weight: 1, or _sample_interval for sampled stores. |
src/analytics/sql.ts:53 |
Methods
Section titled “Methods”bucket()
Section titled “bucket()”bucket(interval): string;Defined in: src/analytics/sql.ts:59
Expression yielding the bucket start in epoch millis.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
interval |
AnalyticsInterval |
Returns
Section titled “Returns”string
timeRange()
Section titled “timeRange()”timeRange( fromMs, toMs, p): string;Defined in: src/analytics/sql.ts:55
[from, to) time predicate (epoch millis).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
fromMs |
number | undefined |
toMs |
number | undefined |
p |
SqlBinder |
Returns
Section titled “Returns”string