(event: Event)
| 250 | } |
| 251 | |
| 252 | private toInsertRow(event: Event) { |
| 253 | return applySpec({ |
| 254 | event_id: pipe(prop('id'), toBuffer), |
| 255 | event_pubkey: pipe(prop('pubkey'), toBuffer), |
| 256 | event_created_at: prop('created_at'), |
| 257 | event_kind: prop('kind'), |
| 258 | event_tags: pipe(prop('tags'), toJSON), |
| 259 | event_content: prop('content'), |
| 260 | event_signature: pipe(prop('sig'), toBuffer), |
| 261 | remote_address: path([ContextMetadataKey as any, 'remoteAddress', 'address']), |
| 262 | expires_at: ifElse( |
| 263 | propSatisfies(is(Number), EventExpirationTimeMetadataKey), |
| 264 | prop(EventExpirationTimeMetadataKey as any), |
| 265 | always(null), |
| 266 | ), |
| 267 | })(event) |
| 268 | } |
| 269 | |
| 270 | private insert(event: Event) { |
| 271 | logger('inserting event: %o', event) |
no outgoing calls
no test coverage detected