export class QueryCache {
constructor() {
this.entries = new Map();
}
getEntry(key) {
const { z } = require('zod');
const envSchema = z
.object({
NODE_ENV: z
.enum(['development', 'test', 'production'])
class AddSoftDeleteToDocuments < ActiveRecord::Migration[7.0]
def change
add_column :documents, :deleted_at, :datetime
add_index :documents, :deleted_at
# Replace the global unique index with one scoped to live rows,
type Loader<T> = () => Promise<T>;
interface Entry<T> {
value: T;
expiresAt: number;
}
class User < ApplicationRecord
has_many :posts
has_many :comments
scope :digest_subscribers, -> {
where(digest_opt_in: true).where.not(confirmed_at: nil)
from sqlalchemy import Column, Integer, BigInteger, String
from sqlalchemy.orm import declarative_base
Base = declarative_base()
import { Controller, Sse, Headers } from '@nestjs/common';
import { interval, Observable } from 'rxjs';
import { map } from 'rxjs/operators';
interface FeedPayload {
id: number;
const CACHE_NAME = 'swr-api-v1';
const STAMP_HEADER = 'x-cached-at';
async function open() {
return caches.open(CACHE_NAME);
}
export interface UploadHandle {
promise: Promise<{ status: number; body: string }>;
xhr: XMLHttpRequest;
}
export function uploadFile(
export interface Post {
id: string;
title: string;
updatedAt: string;
}
<?php
namespace App\ValueObjects;
final readonly class NotificationSettings
{
package com.shop.shipping;
import java.math.BigDecimal;
public interface ShippingCostCalculator {