← All modules

memory

database-module

v0.6.14 View source

Install with tiny

$ tiny install database-module
Don't have tiny?

Components

7 available
  • postgres_execExecutes INSERT/UPDATE/DELETE against Postgres with positional parameters. Connection pool is cached per DSN across calls.
  • postgres_queryRuns SELECT against Postgres and returns rows as a list of objects keyed by column name. Configure expected row shape in settings so downstream edges can navigate the result. Connection pool is cached per DSN.
  • redis_dedupAtomic 'first seen' check via SET NX EX. Routes new IDs to the New port and duplicates to the Seen port. Redis client is cached per URL across calls.
  • redis_getReads a key from Redis. Emits found=false with empty value when the key does not exist; the error port is reserved for actual Redis failures.
  • redis_setSets a key in Redis. Optional TTL via ttlSeconds (0 = no expiry). Optional NX (set only if key does not already exist).
  • vector_searchkNN over a pgvector column. Returns the top-K nearest rows by configurable distance metric, with a normalised score in [0,1]. Optional JSONB metadata filter restricts the search. Pair with vector_upsert to build a RAG store — on the zero-config bundle a query before anything is stored returns an empty result (not an error), so the question path answers gracefully on an empty memory.
  • vector_upsertWrites an embedding row into a pgvector table. INSERT ... ON CONFLICT (id) DO UPDATE — existing rows are overwritten. Zero-config on the in-cluster bundle: leave DSN empty and the table is created automatically on first write (vector dimension inferred from the embedding), and an empty id is auto-generated — so wire embed_text.embedding straight into this node's embedding with NO id-generating node in between. Only an explicit external DSN requires you to pre-create the table.

Release notes

Postgres, Redis, and vector store components