message: updating for new scoped card service api
diff: import { CardWithId } from '../card';
  -import { queryToSQL, param } from '../pgsearch/util';
  +import { param } from '../pgsearch/util';
  import { createTestEnv, TestEnv } from './helpers';
  import { testCard } from './test-card';
  +import { Session } from '../session';
  describe('hub/pgclient', function() {
  let env: TestEnv;
  @@ -16,7 +17,9 @@ describe('hub/pgclient', function() {
  it('it can access the database', async function() {
  let pgclient = await env.container.lookup('pgclient');
  - let result = await pgclient.query('select 1');
  + let cardsService = await env.container.lookup('cards');
  + let cards = cardsService.getScopedCardService(Session.INTERNAL_PRIVILEGED);
  + let result = await pgclient.query(cards, ['select 1']);
  expect(result.rowCount).equals(1);
  });
  @@ -25,11 +28,14 @@ describe('hub/pgclient', function() {
  testCard({ localId: 'card-1', realm: `http://hassan.com/realm` }, { hello: 'world' }).jsonapi
  );
  let pgclient = await env.container.lookup('pgclient');
  - let batch = pgclient.beginBatch();
  + let cardsService = await env.container.lookup('cards');
  + let cards = cardsService.getScopedCardService(Session.INTERNAL_PRIVILEGED);
  +
  + let batch = pgclient.beginBatch(cards);
  await batch.save(card);
  await batch.done();
  - let result = await pgclient.query(queryToSQL([`select * from cards where local_id = `, param('card-1')]));
  + let result = await pgclient.query(cards, [`select * from cards where local_id = `, param('card-1')]);
  expect(result.rowCount).equals(1);
  });
  });
  