You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to do that with something convenient like raw?
Right now I'm having to dig into private attributes to accomplish this:
exportconstpostgisIntersects=({latitude, longitude}: {latitude: number;longitude: number},expression: Expression<string,true,string>,): Expression<boolean,true,'st_intersects'>=>{constpointText=`POINT(${longitude}${latitude})`;// In Postgres, longitude comes first// Have to do `expression as any` because Mammoth doesn't expose `.tokens`.returnnewExpression([newStringToken(`ST_Intersects`),newGroupToken([newSeparatorToken(',',[newGroupToken([newStringToken(`ST_GeogFromText`),newGroupToken([newParameterToken(pointText)])]),newGroupToken((expressionasany).tokens)])])],'st_intersects',);};
The text was updated successfully, but these errors were encountered:
Most of the times I want to use
raw
, I plug in a MammothExpression
, e.g.(
latitude
andlongitude
are JSnumber
values.)Is there a way to do that with something convenient like
raw
?Right now I'm having to dig into private attributes to accomplish this:
The text was updated successfully, but these errors were encountered: