Comments (2)
Yes, that is annoying. However, it's difficult to work support for this in, because it's still possible your loop body could exit early (using an EXIT
statement or an exception). So piggly conservatively assumes any loop is capable of executing 0, 1, or 1+ iterations and records if those happen.
One other approach to handling this (besides trying to analyze the loop body, which is probably a ton of work -- exceptions can happen unpredictably, in division by zero, in calls to other procedures, if a value is unexpectedly NULL
, etc, or inferring a loop cannot exit early might require evaluating complex conditional expressions) would be to allow users to add comments to annotate their code with hints to piggly.
I'm not sure how that would work in practice, at least in terms of syntax, and how piggly would know exactly which segment of code the comment applies to. But I can vaguely imagine having something like -- piggly: assume loop iterates zero times
. This too would be non-trivial, so I don't imagine adding it myself anytime soon.
from piggly.
understood. no worries.
from piggly.
Related Issues (20)
- Parser issue - DML in WITH query HOT 13
- use of select filter HOT 3
- config.dry_run undefined HOT 1
- issue with table return types HOT 1
- error installing piggly gem on windows HOT 11
- declare statement before begin causes parse failure HOT 4
- failing to capture calls to secondary procedure for perform call HOT 6
- Replace source using UPDATE pg_proc HOT 2
- another parse issue "RAISE {cr} USING" HOT 1
- Improve keyword parsing HOT 1
- ERROR: zero-length delimited identifier at or near """" (PG::SyntaxError) HOT 2
- No tag with id X (RuntimeError) HOT 12
- gcov/lcov support HOT 2
- Functions that declare a non-trivial cursor fail to compile HOT 2
- Failure to parse a file containing bigint HOT 4
- Improve automated testing HOT 3
- Make the reports prettier!
- Support for latest stored procedure syntax
- `defaults': Couldn't parse default arguments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from piggly.