cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Drivine - TypeScript Neo4j Client

jasperblues
Graph Buddy

drivine.org

Drivine is a TypeScript client for Neo4j.

It is designed to to scale to hundreds or thousands of transactions per second and allows you to meet these goals without compromising architectural integrity.

The library provides a sweet-spot level of abstraction, with management and object to graph mapping (OGM) features. This includes the following:

  • Manages infrastructure concerns, such as obtaining and releasing connections and sessions.
  • Facilitates implementation of repositories, which can be injected into services. Your code adheres to single responsibility principle (SRP).
  • Supports declarative, decorator-driven transactions.
  • Supports streaming.
  • Maps and transforms query results onto typed entities or models. With Drivine you're not tied down by a single static domain model, with generated queries. We let you make the most of your graph database, using CYPHER and map the results.

Start creating repositories like the one below, by following the quick start guide:

@Injectable()
export class RouteRepository {
    public constructor(
        public readonly persistenceManager: TransactionalPersistenceManager,
        @InjectCypher('@/traffic/routesBetween')) {
    }

    @Transactional() 
    public async findFastestBetween(start: string, 
        destination: string): Promise<Route> {

        return this.persistenceManager.getOne(
            new QuerySpecification<Route>()
                .withStatement(this.routesBetween)
                .bind([start, destination])
                .limit(1)
                .transform(Route)
        );
    }
}
0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online