How to use feathers-sequelize - 10 common examples

To help you get started, we’ve selected a few feathers-sequelize examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github feathers-plus / generator-feathers-plus / test-expands / ts-cumulative-2-sequelize-services.test-expected / src1 / services / users-1 / users-1.service.ts View on Github external
let moduleExports = function (app: App) {
  let Model = createModel(app);
  let paginate = app.get('paginate');
  // !code: func_init // !end

  let options = {
    Model,
    paginate,
    // !code: options_more // !end
  };
  // !code: options_change // !end

  // Initialize our service with any options it requires
  // ! code: extend
  app.use('/users-1', createService(options));
  // !end

  // Get our initialized service so that we can register hooks
  const service = app.service('users-1');

  service.hooks(hooks);
  // !code: func_return // !end
};
github feathers-plus / generator-feathers-plus / test / ts-cumulative-2-sequelize-services.test-expected / src1 / services / users-1 / users-1.service.ts View on Github external
let moduleExports = function (app: App) {
  let Model = createModel(app);
  let paginate = app.get('paginate');
  // !code: func_init // !end

  let options = {
    Model,
    paginate,
    // !code: options_more // !end
  };
  // !code: options_change // !end

  // Initialize our service with any options it requires
  app.use('/users-1', createService(options));

  // Get our initialized service so that we can register hooks
  const service = app.service('users-1');

  service.hooks(hooks);
  // !code: func_return // !end
};
github feathers-plus / generator-feathers-plus / test / ts-cumulative-2-sequelize-services.test-expected / src1 / services / nedb-2 / nedb-2.service.ts View on Github external
let moduleExports = function (app: App) {
  let Model = createModel(app);
  let paginate = app.get('paginate');
  // !code: func_init // !end

  let options = {
    Model,
    paginate,
    // !code: options_more // !end
  };
  // !code: options_change // !end

  // Initialize our service with any options it requires
  app.use('/nedb-2', createService(options));

  // Get our initialized service so that we can register hooks
  const service = app.service('nedb-2');

  service.hooks(hooks);
  // !code: func_return // !end
};
github feathers-plus / generator-feathers-plus / test-expands / ts-cumulative-2-sequelize-services.test-expected / src1 / services / nedb-2 / nedb-2.service.ts View on Github external
let moduleExports = function (app: App) {
  let Model = createModel(app);
  let paginate = app.get('paginate');
  // !code: func_init // !end

  let options = {
    Model,
    paginate,
    // !code: options_more // !end
  };
  // !code: options_change // !end

  // Initialize our service with any options it requires
  // ! code: extend
  app.use('/nedb-2', createService(options));
  // !end

  // Get our initialized service so that we can register hooks
  const service = app.service('nedb-2');

  service.hooks(hooks);
  // !code: func_return // !end
};
github feathers-plus / generator-feathers-plus / test / ts-cumulative-2-sequelize-services.test-expected / src1 / services / nedb-1 / nedb-1.service.ts View on Github external
let moduleExports = function (app: App) {
  let Model = createModel(app);
  let paginate = app.get('paginate');
  // !code: func_init // !end

  let options = {
    Model,
    paginate,
    // !code: options_more // !end
  };
  // !code: options_change // !end

  // Initialize our service with any options it requires
  app.use('/nedb-1', createService(options));

  // Get our initialized service so that we can register hooks
  const service = app.service('nedb-1');

  service.hooks(hooks);
  // !code: func_return // !end
};
github feathers-plus / generator-feathers-plus / test-expands / ts-cumulative-2-sequelize-services.test-expected / src1 / services / nedb-1 / nedb-1.service.ts View on Github external
let moduleExports = function (app: App) {
  let Model = createModel(app);
  let paginate = app.get('paginate');
  // !code: func_init // !end

  let options = {
    Model,
    paginate,
    // !code: options_more // !end
  };
  // !code: options_change // !end

  // Initialize our service with any options it requires
  // ! code: extend
  app.use('/nedb-1', createService(options));
  // !end

  // Get our initialized service so that we can register hooks
  const service = app.service('nedb-1');

  service.hooks(hooks);
  // !code: func_return // !end
};
github telstra / openapi-platform / src / backend / db / spec-model.tsx View on Github external
export function createSpecService(specModel) {
  const service = sequelize({
    Model: specModel,
  });
  service.docs = {
    description: 'Swagger/OpenAPI specs',
    definitions: {
      specifications: {
        type: 'object',
        additionalProperties: true,
      },
      'specifications list': {
        type: 'array',
      },
    },
  };
  return service;
}
github telstra / openapi-platform / packages / server / src / db / blob-model.ts View on Github external
export function createBlobMetadataService(blobMetadataModel) {
  return sequelize({
    Model: blobMetadataModel,
  });
}
github telstra / openapi-platform / packages / server / src / db / sdk-model.ts View on Github external
export function createSdkService(sdkModel) {
  const service = sequelize({
    Model: sdkModel,
  });
  service.docs = {
    description: 'The SDKs generated by OpenAPI specifications',
    definitions: {
      sdks: {
        type: 'object',
        properties: {
          sdkConfigId: {
            type: 'integer',
            format: 'int64',
            description: 'ID of the SDK configuration to generate the SDK for',
          },
          path: {
            type: 'string',
            description: 'URL from where the SDK can be downloaded from',
github telstra / openapi-platform / packages / server / src / db / sdk-config-model.ts View on Github external
export function createSdkConfigService(sdkConfigModel) {
  const service = sequelize({
    Model: sdkConfigModel,
  });
  service.docs = {
    description:
      'The SDK configurations used for generating SDKs according to a given ' +
      'specification',
    definitions: {
      sdkConfigs: {
        type: 'object',
        properties: {
          specId: {
            type: 'integer',
            format: 'int64',
            description: 'ID of the specification associated with the SDK configuration',
          },
          target: {

feathers-sequelize

A service adapter for Sequelize an SQL ORM

MIT
Latest version published 1 year ago

Package Health Score

69 / 100
Full package analysis

Popular feathers-sequelize functions