totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

How do I apply the typeCast hack to the Database? #627

Closed blaasvaer closed 6 years ago

blaasvaer commented 6 years ago

Where do I apply this to the DB:

...
    typeCast: function castField( field, useDefaultTypeCasting ) {
        if ( ( field.type === "BIT" ) && ( field.length === 1 ) ) {
            var bytes = field.buffer();
            return( bytes[ 0 ] === 1 );
        }
        return( useDefaultTypeCasting() );
    }
...

When I initialize it using this:

let mysql_connection_string = "mysql://root:root@localhost:3306/timetracker";
require('sqlagent/mysql').init( mysql_connection_string, true ); // debug is by default: false

As I have no Agent to attach it to ...

BlueMagnificent commented 6 years ago

@blaasvaer, not to be offended, I believe this is not an issue. For these kind of questions there is TotalJS Chat Support where you can ask all your questions

blaasvaer commented 6 years ago

Yes, I know. But part of the problem is, that github is supposed to be a part of the community (see screenshot from the totaljs.com website).

And when looking for answers, there really seems no where to go in terms of 'community'. It's scattered all over the place. I know that 'issues' on github is supposed to be about issues – but you could actually broadly define it as an issue, that it's pretty hard to find specific information about the framework ... guessing where to look in the API docs isn't much help.

screen shot 2018-04-03 at 15 54 01

So, therefore, I'm asking here. And not offended at all ; ).

BlueMagnificent commented 6 years ago

I get your point, but I still think the Chat Support is the best way to go

ghost commented 6 years ago

If you want to have more visibility for your community Github is a great platform.

Total Chat support is an alternative but not visible from Search engine

Envoyé de mon iPhone

Le 4 avr. 2018 à 03:23, Nwokoma Uchechukwu notifications@github.com a écrit :

@blaasvaer, not to be offended, I believe this is not an issue. For these kind of questions there is TotalJS Chat Support where you can ask all your questions

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

BlueMagnificent commented 6 years ago

@twisig For that I'd suggest a stackoverflow page, I'm not really a party to posting call for help on github as issues. It gives the wrong impression to the state of the project. Just imagine having 500 open issues on a github repo with more than 90% of them being "how can I do this" kind of questions instead of actual issues.

petersirka commented 6 years ago

@blaasvaer put it to some definition file. We do what we can and as I wrote you must buy a support and personally helped you a lot. Please don't create issues on GitHub. GitHub is for real bugs, improvements, ideas, etc.. For basic questions use Messenger or StackOverflow.

@twisig yes and therefore @blaasvaer can create a post on StackOverflow.

@binarygeotech thank you!

blaasvaer commented 6 years ago

Then please, remove the github link from your »Framework community« page. It's adding to the confusion ... and while we're at it, maybe also LinkedIn as well, as that would be covered as well by the arguments.