Skip to content

JQOM in JS #555

@GauBen

Description

@GauBen

As a developer

I want to write type-safe JCR queries

Jahia exposes a language named JQOM to Java/JSP modules, but it is not available in JavaScript modules. The goal of this epic is to expose JQOM primitives in an idiomatic JS way. My primary sources of inspiration for the DX of the feature are Prisma and Drizzle:

// Prisma
await prisma.user.findMany({
  where: {
    // Basic AND
    id: 42,
    name: 'Dan'
  }
});
await prisma.user.findMany({
  where: {
    OR: [
      {
        email: {
          endsWith: 'gmail.com',
        },
      },
      { email: { endsWith: 'company.com' } },
    ],
    NOT: {
      email: {
        endsWith: 'admin.company.com',
      },
    },
  },
});

// Drizzle
await db.select().from(users).where(
  and(
    eq(users.id, 42),
    eq(users.name, 'Dan')
  )
);

Non-functional requirements

  • Security
    • Identity management
    • Authentication
    • Authorization
    • Session management
    • Data validation
    • Error handling
  • Performances
  • Migration
  • Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions