profile
viewpoint

bmax/ChoresApp 2

An Ruby On Rails application that helps deal with delegating chores

bmax/api-blueprint 1

API Blueprint

bmax/automatic-php-api 1

A barebones PHP API for the Automatic API

bmax/bmaxio 1

Personal Website

bmax/babel 0

:tropical_fish: Babel is a compiler for writing next generation JavaScript.

bmax/brackets 0

An open source code editor for the web, written in JavaScript, HTML and CSS.

bmax/composer 0

Dependency Manager for PHP

bmax/CSE232 0

C++ MSU

issue openedtypeorm/typeorm

getQueryAndParameters on PostgresSQL driver increments parameter values incorrectly

Issue type:

[ ] question [x] bug report [ ] feature request [ ] documentation issue

Database system/driver:

[ ] cordova [ ] mongodb [ ] mssql [ ] mysql / mariadb [ ] oracle [x] postgres [ ] cockroachdb [ ] sqlite [ ] sqljs [ ] react-native [ ] expo

TypeORM version:

[x] latest [ ] @next [ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem: Hello,

  const userRepository = connection.getRepository(User);
                const one_column = "new_update";
                const two_column = "hello";
                const qb = userRepository
                    .createQueryBuilder()
                    .update("layout_section_tables")
                    .set({
                        one_column
                    })
                    .where("two_column = :two_column", {
                        two_column
                    });
                console.log(qb.getSql());
                console.log(qb.getSql());

The console log returns the following:

UPDATE "layout_section_tables" SET "one_column" = $1 WHERE "two_column" = $2
UPDATE "layout_section_tables" SET "one_column" = $2 WHERE "two_column" = $2

I have identified the problem but not sure if my fix is correct.

Here is where the problem lies: https://github.com/typeorm/typeorm/blob/master/src/query-builder/UpdateQueryBuilder.ts#L390

My solution is adding this.connection.driver instanceof PostgresDriver || to the ternary.

I can create the PR if you think that is the best way to go.

Thanks cc @Kononnable @pleerock

created time in 6 days

issue commenttypeorm/typeorm

$1 param got ignored in createQueryBuilder update

Hello,

I believe I have more information on this bug.

The code below also shows the same problem but I think with a little more context/clarity:

  const userRepository = connection.getRepository(User);
                const one_column = "new_update";
                const two_column = "hello";
                const qb = userRepository
                    .createQueryBuilder()
                    .update("layout_section_tables")
                    .set({
                        one_column
                    })
                    .where("two_column = :two_column", {
                        two_column
                    });
                console.log(qb.getSql());
                console.log(qb.getSql());

The console log returns the following:

UPDATE "layout_section_tables" SET "one_column" = $1 WHERE "two_column" = $2
UPDATE "layout_section_tables" SET "one_column" = $2 WHERE "two_column" = $2

I have identified the problem but not sure if my fix is correct.

Here is where the problem lies: https://github.com/typeorm/typeorm/blob/master/src/query-builder/UpdateQueryBuilder.ts#L390

My solution is adding this.connection.driver instanceof PostgresDriver || to the ternary.

I can create the PR if you think that is the best way to go. cc @Kononnable @pleerock

BondWong

comment created time in 8 days

push eventbmax/logstash-input-jdbc

Brandon Max

commit sha 5a6f6a4c5bada73fe4aab648b4cb819ffa3fb45a

Fix jdbc_fetch_size usage with postgresql

view details

push time in 10 days

starteddeviceplane/deviceplane

started time in 14 days

push eventbmax/logstash-input-jdbc

Brandon Max

commit sha 8a31aea683284f7dadd2dd9652cef65e5f2df245

Fix jdbc_fetch_size usage with postgresql

view details

push time in a month

PR opened logstash-plugins/logstash-input-jdbc

Fix jdbc_fetch_size usage with postgresql

Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/

+13 -7

0 comment

2 changed files

pr created time in a month

create barnchbmax/logstash-input-jdbc

branch : fix_postgressql_fetching

created branch time in a month

push eventbmax/logstash-input-jdbc

Brandon Max

commit sha 3e34643d4b1a6217b8149a1657a1e5654610eef3

Fix jdbc_paging_enabled config flag not being passed through

view details

Rob Bavey

commit sha 48ba1087f5901bbfacbf17f9ffafe11892348c4f

Merge pull request #361 from bmax/issue#360 Fix jdbc_paging_enabled config flag not being passed through

view details

Rob Bavey

commit sha ae2523b5810eca7c5aa0a19b8677b49b643318fb

Update version to 4.3.19, update changelog (#363)

view details

push time in a month

pull request commentlogstash-plugins/logstash-input-jdbc

Fix jdbc_paging_enabled config flag not being passed through

woohoo @robbavey! Super excited, thanks. How does the default version that gets included with Logstash's Dockerfile get updated?

bmax

comment created time in 3 months

pull request commentlogstash-plugins/logstash-input-jdbc

Fix jdbc_paging_enabled config flag not being passed through

@robbavey Any help?

bmax

comment created time in 3 months

fork bmax/logform

An mutable object format designed for chaining & objectMode streams

fork in 3 months

PR opened logstash-plugins/logstash-input-jdbc

Fix jdbc_paging_enabled config flag not being passed through

fixes https://github.com/logstash-plugins/logstash-input-jdbc/issues/360

Not a ruby developer by trade so having trouble making the test better.

+5 -5

0 comment

2 changed files

pr created time in 3 months

created repositorybmax/pr

created time in 3 months

create barnchbmax/logstash-input-jdbc

branch : issue#360

created branch time in 3 months

issue openedlogstash-plugins/logstash-input-jdbc

Paging bug: JDBC_PAGING_ENABLED and JDBC_PAGE_SIZE degraded after version 4.3.14

Hello! It seems like at the same time prepared statements were introduced in version 4.3.16 is the same time paging functionality broke. I've tested this by rolling back to 4.3.14 and ensuring that jdbc_paging_enabled works. I am also working on a PR for a fix but in the mean time I thought I'd get this issue out first in case anyone else is having trouble.

The problem resides here: https://github.com/logstash-plugins/logstash-input-jdbc/blob/master/lib/logstash/plugin_mixins/jdbc/statement_handler.rb#L34

The variable @jdbc_paging_enabled is not available in that context therefore this will never evaluate as true.

Debugging information

  • Version: > 4.3.14
  • Operating System: centos (Docker image logstash:7.4.1)
  • Config File (if you have sensitive info, please remove it):
input {
  jdbc {
    jdbc_driver_library => "/usr/share/logstash/bin/postgresql-42.2.8.jar"
    jdbc_driver_class => "org.postgresql.Driver"
    jdbc_connection_string => "jdbc:postgresql://${POSTGRES_URL}/${POSTGRES_DB}"
    jdbc_user => "${POSTGRES_USER}"
    jdbc_password => "${POSTGRES_PASSWORD}"
    schedule => "* * * * * *"
    jdbc_paging_enabled => true
    jdbc_page_size => 10
    statement => "SELECT * from test"
  }
}

output {
  elasticsearch {
    document_id => "visit-%{user_id}-%{merchant_id}"
    hosts    => [ "${ELASTICSEARCH_HOST}" ]
    index => "program_users"
  }
}
  • Steps to Reproduce: Include jdbc_paging_enabled and ensure that the select query does not include limit or offset.

created time in 3 months

fork bmax/logstash-input-jdbc

Logstash Plugin for JDBC Inputs

fork in 3 months

startedmarknotfound/nothings

started time in 4 months

issue closedseanpmaxwell/overnight

Testing

Hey @seanpmaxwell,

Awesome piece of code ya have here. We're using it in Production and it's all great. We're trying to figure out how to test the controllers/middlewares with Jest. Any good advice? So far the only way I can do it is make the method public and mock a request/response but that doesn't do any good for the Middleware decorator.

Let me know if I can help with a PR if you have any ideas.

Thanks, Brandon.

closed time in 4 months

bmax

issue commentseanpmaxwell/overnight

Testing

Thanks @seanpmaxwell this helps a ton.

bmax

comment created time in 4 months

issue commentseanpmaxwell/overnight

Testing

@seanpmaxwell Thanks! That looks like it's super useful for end-to-end testing. I'm looking for more just shallow unit testing. The test server concept might help me with that though. Let me give it another try.

bmax

comment created time in 4 months

issue openedseanpmaxwell/overnight

Testing

Hey @seanpmaxwell,

Awesome piece of code ya have here. We're using it in Production and it's all great. We're trying to figure out how to test the controllers/middlewares with Jest. Any good advice? So far the only way I can do it is make the method public and mock a request/response but that doesn't do any good for the Middleware decorator.

Let me know if I can help with a PR if you have any ideas.

Thanks, Brandon.

created time in 4 months

PR opened typeorm/typeorm

Fix Slack invite URL
+1 -1

0 comment

1 changed file

pr created time in 5 months

push eventbmax/typeorm

Brandon Max

commit sha ad18b22104dddbbc30e8fbeedfc2d5780a8c96cc

Fix Slack invite URL

view details

push time in 5 months

fork bmax/typeorm

ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

http://typeorm.io

fork in 5 months

issue commenttypeorm/typeorm

Future of TypeORM

@pleerock hi,

I was wondering if there was a new invite to the slack channel the one in the CONTRIBUTING.MD and one above says link is expired.. I can update the docs if you send me a new link.

Thanks!

dominicdesu

comment created time in 5 months

more