@mongodb-js/compass-query-bar
TypeScript icon, indicating that this package has built-in type declarations

8.25.1 • Public • Published

Compass Query Bar

Renders a component for executing MongoDB queries through a GUI

Usage

Browser

Setting values via configure:

import Plugin, {
  configureStore,
  configureActions,
} from '@mongodb-js/compass-query-bar';

const actions = configureActions();
const store = configureStore({
  localAppRegistry: appRegistry,
  actions: actions,
  namespace: 'db.coll',
  serverVersion: '4.2.0',
  fields: [],
});

<Plugin store={store} actions={actions} />;

Hadron/Electron

const role = appRegistry.getRole('Query.QueryBar')[0];
const Plugin = role.component;
const configureStore = role.configureStore;
const configureActions = role.configureActions;

const actions = configureActions();
const store = configureStore({
  globalAppRegistry: appRegistry,
  localAppRegistry: localAppRegistry,
  actions: actions,
  namespace: 'db.coll',
  serverVersion: '4.2.0',
  fields: [],
});

<Plugin store={store} actions={actions} />;

Fields

The fields array must be an array of objects that the ACE editor autocompleter understands. See This example for what that array looks like.

Readme

Keywords

none

Package Sidebar

Install

npm i @mongodb-js/compass-query-bar

Weekly Downloads

166

Version

8.25.1

License

SSPL

Unpacked Size

1.1 MB

Total Files

76

Last publish

Collaborators

  • orechova
  • himanshusinghs
  • c-buckingham
  • mongo-j
  • mabaasit
  • alexander_schroll
  • chuck.kalmanek
  • mongodb-js-user
  • rueckstiess
  • durran
  • lerouxb
  • fredtruman
  • mbroadst
  • hswolff
  • satyasinha
  • matt_d_rat
  • rhysm
  • tomhollander
  • alena.khineika
  • jeff-allen-mongo
  • mmarcon
  • jonathan.balsano
  • mongodb-build
  • jack.weir
  • stennie
  • mcasimir
  • kristina.stefano
  • jarjee
  • shaketbaby
  • devtoolsbot
  • addaleax
  • gribnoysup
  • mutukrish