Code Monkey home page Code Monkey logo

nodebb's People

Contributors

alexandra-c avatar dcosti avatar dependabot[bot] avatar dragos-rosca avatar fraliv13 avatar oncicaradupopovici avatar vcuzmin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodebb's Issues

Should Replace "sys.tables" With "information_schema.tables"

async function getTablesWithColumn(column, knex) {
const data = await knex
.select('t.name as [table]', 's.name as [schema]')
.from('sys.tables as t')
.join('sys.schemas as s', 't.schema_id', 's.schema_id')
.whereExists(function () {
this.select('*')
.from('sys.columns as c')
.whereRaw('c.object_id = t.object_id')
.andWhere(`c.name`, '=', column)
})
return data
}

I think you should use information_schema.tables (or better yet information_schema.columns and use a distinct) because:

  • sys.tables does not give you views.
  • information_schema is more generic and can be found on other servers (like PostgreSQL), unlike sys.tables

Add simple global filter support for Knex

One should be able to specify a global query filter providing the following info:

  • a table predicate: tableName -> bool
  • some hooks: onSelect, onInsert, onUpdate, onDelete

The filter should call the appropriate hook for the coresponding sql statements

Outer Join

Found a new oversite on nodebb/packages/knex-filters/src/queryBuilder.js .
If I build a query with any kind of "outer join" the library will automatically add a "where TenantId" clause. But the purpose of "outer join" is to show data from a table even if the joined table returns null. If the join table shows null on all columns that means t.TenantId will also be null and our forced where clause will remove the row.

There is a quick fix that might work, to just put where [...] and (tenantId is null or tenantId='value') [...]. Or we can go with a more sophisticated fix that will notice the outer joins and put the tenant restriction in the on space like: [...] from A left join B on A.id = B.idOfA and B.tenantId = 'value' [...] this will bring in the correct data. But you have left, right and full outer join and all cases must be covered.

message-bus stale subscriber issue

When used from message-host, at some point the subscriptions become stale, they stop receiving messages from nats.
There are no relevant errors or logging info available.

The message-bus should log the error events coming from both transport connection and transport subscription. Should also verify other unhandled transport events.

When SubscriptionOptions.STREAM_PROCESSOR is set the underlying subscriptions options should be set:

  • opts.setMaxInFlight(1)
  • opts.setManualAckMode(true)

See https://github.com/nats-io/stan.js/blob/master/examples/stan-worker.js

The underlying transport options should be overridden through environment variables

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.