Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: report running balances #1301

Merged
merged 1 commit into from
Mar 3, 2017

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Mar 2, 2017

This commit implements the correct cumulative balance summation for the
accounts report that initializes and updates variables in the same SQL
statement. By maintaining all variables in the same statement, the
variables are ensured to be zeroes out prior to usage and do not spread
over multiple MySQL connections.

This solution, while complex, allows total control over filtering via
our standard filtering solutions. Placing the query in a Stored
Procedure (another solution to localize the variable to a single MySQL
connection/context) would require that any further filters write a new
interface to the stored procedure.

Closes #1273.


Thank you for contributing!

Before submitting this pull request, please verify that you have:

  • Run your code through ESLint. Check out our styleguide.
  • Run integration tests.
  • Run end-to-end tests.
  • Accurately described the changes your are making in this pull request.

For a more detailed checklist, see the official review checklist that this PR will be evaluated against.

Ensuring that the above checkboxes are completed will help speed the review process and help build a stronger application. Thanks!

This commit implements the correct cumulative balance summation for the
accounts report that initializes and updates variables in the same SQL
statement. By maintaining all variables in the same statement, the
variables are ensured to be zeroes out prior to usage and do not spread
over multiple MySQL connections.

This solution, while complex, allows total control over filtering via
our standard filtering solutions.  Placing the query in a Stored
Procedure (another solution to localize the variable to a single MySQL
connection/context) would require that any further filters write a new
interface to the stored procedure.

Closes Third-Culture-Software#1273.
@jniles jniles added the Bug Fix label Mar 2, 2017
@jniles jniles requested a review from sfount March 2, 2017 16:28
Copy link
Contributor

@sfount sfount left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@sfount sfount merged commit e1be96e into Third-Culture-Software:master Mar 3, 2017
@jniles jniles deleted the fix-running-balances branch March 6, 2017 06:18
bors bot added a commit that referenced this pull request Jun 13, 2018
2849: Update winston to the latest version 🚀 r=jniles a=greenkeeper[bot]


## Version **3.0.0** of [winston](https://github.com/winstonjs/winston) was just published.

<table>
  <tr>
    <th align=left>
      Dependency
    </th>
    <td>
      <code>winston</code>
    </td>
  </tr>
  <tr>
      <th align=left>
       Current Version
      </th>
      <td>
        2.4.3
      </td>
    </tr>
  <tr>
    <th align=left>
      Type
    </th>
    <td>
      dependency
    </td>
  </tr>
</table>

The version **3.0.0** is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of winston.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


---


<details>
<summary>Commits</summary>
<p>The new version differs by 321 commits ahead by 321, behind by 17.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/8be746b4fba623c7167420c887ee9cf3d4147664"><code>8be746b</code></a> <code>[dist] Version bump. 3.0.0</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/ce2c0dc1f2a2cd7ad6b03ec19ad11ed320770472"><code>ce2c0dc</code></a> <code>3.0.0 pre-release  (#1342)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/133d0c2886dcd330db737f013703efbc869276fa"><code>133d0c2</code></a> <code>[doc] Cleaned up some of the documentation on <code>colorize</code> to address c… (#1301)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/d70150512db85acf4084cfde8a2b5c8ba3ab620b"><code>d701505</code></a> <code>Remove paddings as we have no use for it in the current API. (#1357)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/11283a07887b002b4848ec75ffdf556677b7f2ac"><code>11283a0</code></a> <code>Move splat functionality into logform. Fixes #1298 (#1356)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/109031fa16ea5d72172c1555eaf8e728e528aa12"><code>109031f</code></a> <code> [fix] Update level property to change transport level #1191 (#1328)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/4c301ebdefafd16f169dbe3e1da6ec609cb6d723"><code>4c301eb</code></a> <code>[dist] Update package-lock.json</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/5fdfad8d6cba3d42e7565c8fbb23ec4342a0cfcd"><code>5fdfad8</code></a> <code>Wrap calls to <code>format.transform</code> with try / catch.  (#1347)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/0c84f4f8f909def084ea2225016db5b810d84587"><code>0c84f4f</code></a> <code>Implement _final from Node.js streams; misc. clean-up   (#1346)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/4089b596947ba9abfc93ca102ae2fcf1bf9f5f12"><code>4089b59</code></a> <code>[doc fix] Formatting fixes to docs.</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/189559bad78ca26cf946043de6f9c8dd11ca0049"><code>189559b</code></a> <code>console transport: send all levels to stdout not stderr by default (#1332)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/30b83f9eabaff482f7931187b62237e36137627c"><code>30b83f9</code></a> <code>[fix] Follow-up to #1344 to use setMaxListeners in all relevant locations.</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/767b010e781a2b2a3ed44ce2716ee273af408dc5"><code>767b010</code></a> <code>Set max listeners to 30 to silence node warnings (#1344)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/ad1e1bf332393a22574380dc6dd678315b937d97"><code>ad1e1bf</code></a> <code>[fix test] Document how to use levels. Add test to ensure it is true. (#1343)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/0be23625067ab17155e6518a8a07d2b93f8afd01"><code>0be2362</code></a> <code>Check log.length when evaluating "legacyness" of transports (#1340)</code></li>
</ul>
<p>There are 250 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/winstonjs/winston/compare/dc74db60b8d46475fce04bab1e0c31abe5201e09...8be746b4fba623c7167420c887ee9cf3d4147664">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴



Co-authored-by: greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
bors bot added a commit that referenced this pull request Sep 4, 2018
3139: Update winston to the latest version 🚀 r=jniles a=greenkeeper[bot]




## Version **3.0.1** of **winston** was just published.

<table>
  <tr>
    <th align=left>
      Dependency
    </th>
    <td>
      <a target=_blank href=https://github.com/winstonjs/winston>winston</a>
    </td>
  </tr>
  <tr>
      <th align=left>
       Current Version
      </th>
      <td>
        2.4.4
      </td>
    </tr>
  <tr>
    <th align=left>
      Type
    </th>
    <td>
      dependency
    </td>
  </tr>
</table>



The version **3.0.1** is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of winston.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


---


<details>
<summary>Commits</summary>
<p>The new version differs by 323 commits ahead by 323, behind by 21.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/d0a70d3b2f4492d9375a1351a191480a364cc28c"><code>d0a70d3</code></a> <code>[dist] Version bump. 3.0.1</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/05d0c1e1910dbcb0462f8dda9ff8fa273f8e0017"><code>05d0c1e</code></a> <code>npm ignore scratch folder from CI</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/8be746b4fba623c7167420c887ee9cf3d4147664"><code>8be746b</code></a> <code>[dist] Version bump. 3.0.0</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/ce2c0dc1f2a2cd7ad6b03ec19ad11ed320770472"><code>ce2c0dc</code></a> <code>3.0.0 pre-release  (#1342)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/133d0c2886dcd330db737f013703efbc869276fa"><code>133d0c2</code></a> <code>[doc] Cleaned up some of the documentation on <code>colorize</code> to address c… (#1301)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/d70150512db85acf4084cfde8a2b5c8ba3ab620b"><code>d701505</code></a> <code>Remove paddings as we have no use for it in the current API. (#1357)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/11283a07887b002b4848ec75ffdf556677b7f2ac"><code>11283a0</code></a> <code>Move splat functionality into logform. Fixes #1298 (#1356)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/109031fa16ea5d72172c1555eaf8e728e528aa12"><code>109031f</code></a> <code> [fix] Update level property to change transport level #1191 (#1328)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/4c301ebdefafd16f169dbe3e1da6ec609cb6d723"><code>4c301eb</code></a> <code>[dist] Update package-lock.json</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/5fdfad8d6cba3d42e7565c8fbb23ec4342a0cfcd"><code>5fdfad8</code></a> <code>Wrap calls to <code>format.transform</code> with try / catch.  (#1347)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/0c84f4f8f909def084ea2225016db5b810d84587"><code>0c84f4f</code></a> <code>Implement _final from Node.js streams; misc. clean-up   (#1346)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/4089b596947ba9abfc93ca102ae2fcf1bf9f5f12"><code>4089b59</code></a> <code>[doc fix] Formatting fixes to docs.</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/189559bad78ca26cf946043de6f9c8dd11ca0049"><code>189559b</code></a> <code>console transport: send all levels to stdout not stderr by default (#1332)</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/30b83f9eabaff482f7931187b62237e36137627c"><code>30b83f9</code></a> <code>[fix] Follow-up to #1344 to use setMaxListeners in all relevant locations.</code></li>
<li><a href="https://urls.greenkeeper.io/winstonjs/winston/commit/767b010e781a2b2a3ed44ce2716ee273af408dc5"><code>767b010</code></a> <code>Set max listeners to 30 to silence node warnings (#1344)</code></li>
</ul>
<p>There are 250 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/winstonjs/winston/compare/67c44ffe1f9db9305a1bc562e0af1a0332588b15...d0a70d3b2f4492d9375a1351a191480a364cc28c">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴



Co-authored-by: greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants