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
Bithound.com and Travis-Ci #243
Comments
Important note: We need to check only two files: |
Bithound is a service to help point out where we can make the code better. Its the first graphic in the readme. As it comes with specifik suggestions linking to specifik lines or functions I imagine its better to let it look in the files in src to help spot the exact location. If we make it to look in the compiled alasql.js you will have to manually locate the specific line in one of the files in src. Do you want me to change it to look into the compiled version? |
At first I was gonna connect Travis too, but putt it off to later. Ideally we must configure it to compile from src with gulp and run the tests on the compiled alasql.js. |
I would prefer |
👍 It will now look into all js in dist that is not *min.js The new changes only take effect when you merge the .bithoundrc file into the master branch... |
Hmm. I make the bithound work on the dev branch. Pfffgghhhh - looks like the alasql.js is too big to be analyzed... hmmm... looking into it |
Agfhhhph
We have to change it back to src |
... it is better if we follow this recomendatiion:
Let's do it on this way:
|
The logical parts make sense if / when we implement the modular setup - so one can parser and backend (well - the last part you can) But there is also a force in having a "THIS IS THE ONE FILE YOU NEED" file for people to get started. Still thinking... |
@mathiasrw I am a little bit tired and want to take couple days off from If you have time and wish, you can fix these bithound problems like The code in It will be great, if at the same time you can document your changes with jsDoc tags (we will use it for API documentation and Closure Compiler). I will spend this time to finish Codex and prepare some documentations for users. Thank you! |
Thanks for letting me know. You have been a machine providing code AND responded to everything within minutes - so makes good sense you need some fresh air. I will make a git-flow feature branch - so we stick to the idea of git-flow - that way we should never have problems with unupdated code :) I will put jsDoc tags where it makes sense - but most of the bithound things are tiny semantic elements. |
Note to self about JSlint
|
Eval is definitely evil. That is why AlaSQL is so fast :) By the way, CrossFilter also uses this approach. |
I guess the reason they warn is that most people dont get when to use and when not to use this feature. Was crossfilter where you got your inspiration from? I really like that the cashing of AlaSQL is based on a custom built functions - it feels sneaky :) |
\Yes and no. The source of inspiration were:
This is the first post where AlaSQL started: lodash/lodash#479 (This is when the history begins!) |
👍 |
Question: Shuld I be worried about the comment here https://github.com/agershun/alasql/blob/1706fdcb2b5166490d8e2492d53b2a14a5c81d21/src/17alasql.js#L247
|
What is the point of
in 05copyright.js line 7? |
In what file is the end of the UMD envelope placed? (start is here https://github.com/agershun/alasql/blob/1706fdcb2b5166490d8e2492d53b2a14a5c81d21/src/10start.js#L25 ) |
I remember you told me that you went from .async to .promise for async execution in the jsDoc comments I found this example
is this still supported? is .promise the same? |
No, the promised version is here: alasql.promise('SELECT * FROM ?,[data])
.then(function(data) {
console.log(data);
}).catch(function(err) {
console.log(err);
}); I just changed the name of the function to more clear from The async varian is still supported:
as well as sync: var res = alasql('SELECT * FROM ?',[data]); |
|
👍 Found a merge error in 72delete.js. Its fixed and placed in develop, but you might want pull the change. |
Just pulled and pushed. Ok. |
Can you describe the problem you mention here https://github.com/agershun/alasql/blob/c0745fc0fb6b257d3771fc93f22d489ccc295daa/src/38query.js#L405 ?
Can we make a test that verify if the problem is still there? |
I dont get the syntax for
in https://github.com/agershun/alasql/blob/c0745fc0fb6b257d3771fc93f22d489ccc295daa/src/38query.js#L277 can you put a word to how it works? |
Question 1
Current loop below this message does not do comparision of nested objects. It is ok for plain SQL, but not ok, if we going to query JSON objects. We need to review all distinct() functions from 15utility.js, keep one which is:
Put it here and in other places with DISTINCTs. Question 2
I wanted to create something like |
Can you elaborate on the relation between the identical code in and |
Nope - never... but looks really awesome ! |
Can you elaborate on https://github.com/agershun/alasql/blob/2277cc08e5210be48206fef992e7c6dd22b42fd6/src/50expression.js#L112
with the definition
must be the same as return true in the first statement. Is it because we cant to return the function |
According the initial idea it should be
I do not know, whey I left the construction with parenthsis, may be this is a bug. Will discover it tonight. Thank you! |
Hah - ok. Sorry for poking the code so much and asking all sorts of questions - but guess it's worth it if we get rid of some bugs on the way :) By the way - check out this - it's important for our MySQL compliant flavour http://mysqlserverteam.com/json-labs-release-native-json-data-type-and-binary-format/ |
Some more details on the mysql JSON date http://mysqlserverteam.com/json-labs-release-json-functions-part-1-manipulation-json-data/ |
As far as I understand it is not so hard to realize MySQL and Prostres JSON functions and casting procedures. It wlll take day pr two. BTW IMHO original AlaSQL's JSON is better than MySQL/Postgres/SQL Server realizations. Ok, I will create issue and some code :) |
I agree - its better and more "native" (as its truely native to Javascript) But we still need to support the syntax if we want to make a flavour thats 100% mysql Question Are you using the functions in 12pretty.js for debugging during development? Calls to functions like L, N, NL, ID, KK are spread out in the code a lot of places, and I dont quite get the point |
SELECT a+b FROM @[{a:1,b:2}] generates:
Here
So, we can:
|
bad eval() flag. Is it possible to turn off this flag, because AlaSQL uses |
Sure. Its added now... |
Hey - can you elaborate on https://github.com/agershun/alasql/blob/develop/src/41exists.js#L18-22 How come both |
Good question. All AlaSQL yy.ExistsValue.prototype.toJavaScript = function(context,tableid,defcols) { The question is:
From quality point of view it is better to keep the same headers with all parameters. The compromise may be to put unnecessary parameters into comments: yy.ExistsValue.prototype.toJavaScript = function(context /*,tableid,defcols */) { |
I found two other services (for future):
It is interesting, who can evaluate AlaSQL wiki? :) |
Couple more badges for our README.md |
Hmmm. Its an issue while developing - not for runtime. Would still be slick if we could have a alasql version for development having a check on the values throwing an error if used
A check that could be stripped out for the normal production version. Is it crazy? |
Could also be a comment in a format where if compiled specific to dev it would get into the code. Like
where a "get dev version" would simply strip the source from the strings |
Hmm. The last input would also make it possible to have
in production but having
in src |
Let's simplify and remove unnecessary parameters. We have few standard functions like this, and probably it is better to describe them at API level. |
👍 |
I am looking into codeclimate.com - for complex project evaluation http://inch-ci.org is buggy - but Im in dialogue with them about why |
Cool! Отправлено с iPhone
|
In https://github.com/agershun/alasql/blob/master/src/50expression.js#L276 and https://github.com/agershun/alasql/blob/master/src/50expression.js#L281 The core of the return statement is
For consistency I have changed it to
Please let me know if the original structure was intentional... |
Please confirm that https://github.com/agershun/alasql/blob/master/src/63createvertex.js#L222-L223 is only for debugging |
Is it an error that the two lines both contain !tbid? is first one ment to be overwritten? https://github.com/agershun/alasql/blob/master/src/424select.js#L118-L119 |
https://github.com/agershun/alasql/blob/master/src/424select.js#L195 |
in 84from.js I found this line if(res[i] == +res[i]) res[i] = +res[i]; I dont really get it. Can you elaborate on the idea? |
Regarding codeclimate.com - we have a new config file in develop so hopefully next time we deploy a version it will work... |
I will move the questions to one issue each |
@mathiasrw You just added a the special config file for http://bithound.com.
Do we need something similar for https://travis-ci.org/ ?
Unfortunately, I have never worked with these services. Will learn it.
The text was updated successfully, but these errors were encountered: