
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@directus/data
Advanced tools
@directus/dataWarning This is a work in progress. Nothing is expected to work yet.
npm install @directus/data
The installation of a driver is also required.
import { DataEngine } from '@directus/data';
import { DataDriverPostgres } from '@directus/data-driver-postgres';
// Instantiate the engine
const engine = new DataEngine();
// Instantiate a driver
const pgDriver = new DataDriverPostgres({
connectionString: 'postgresql://root:password@localhost/mydb',
});
// register the driver to the engine
await engine.registerStore('postgres', pgDriver);
// query data
await engine.query({
store: 'postgres',
collection: 'articles',
fields: [
{
type: 'primitive',
field: 'id',
},
],
});
The above is resulting in the following flow.
graph TB;
api --> data
subgraph da[data abstraction]
direction TB
data --> data-driver-x --> db1[(datastore)]
data --> data-driver-y --> db2[(datastore)]
end
To get an overview of how the package is organized regarding it's files, directories and the dependencies between them,
run pnpm run depcruise and have a look in the created dependency-graph.svg image.
FAQs
Data storage abstraction layer for Directus
We found that @directus/data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.