Database queries not running on Nodejs in beta 4

I haven’t had any time to play with node yet. Everything about it is unfamiliar to me or seems alarming - eg the hosting, website structure, lack of PHP etc. Apart from the current beta issues, can you imagine switching from PHP at any point? Can you already see advantages in development, performance or features etc?

1 Like

I intend do a full re-write of a cms i wrote 18 months ago. Main reason for the re-write is I have access to a huge data API which i need to integrate and the data structures are so different i think it will be easier to re-write it than to patch it.

The site is a PHP site and I am using this time to evaluate if i am to do the re-writre in node or PHP. Fortunately it wont be until around august so I have time for all the bugs to be exorcised from Wappler (and sorry team, there are still lots in this Beta)

Ironically the site is the project I used to learn Wappler (and i can see that by the code in some places!) so the same site may be my first real Node project. I am however using node to process the API data. It’s a bit of a nightmare API as it really only has one end point, get everything so the huge number of objects need to be parsed and in my case written to database tables (as it will be a once a day data sync)

So i guess to some degree what i am doing is a real project but it will only be part of an internal process which can actually run independently from the main site

1 Like

once everything is set up there is not a huge difference between node and PHP in that Wappler does the hard work
I am expecting performance improvements and i am led to believe some great new features are on the way for node, only time will tell

1 Like

There is no PHP, but there is JavaScript. And I think every web developer knows JavaScript. So it is not so hard to learn node.

1 Like

Another error @patrick, in this case a paged query.

  • code: “ER_PARSE_ERROR”,

  • message: “select count() as Total, * from property limit 1 - ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ’ from property limit 1’ at line 1”,

  • stack: “Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘* from property limit 1’ at line 1 at Query.Sequence._packetToError (F:\webs\findmystudentdigs\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14) at Query.ErrorPacket (F:\webs\findmystudentdigs\node_modules\mysql\lib\protocol\sequences\Query.js:79:18) at Protocol._parsePacket (F:\webs\findmystudentdigs\node_modules\mysql\lib\protocol\Protocol.js:291:23) at Parser._parsePacket (F:\webs\findmystudentdigs\node_modules\mysql\lib\protocol\Parser.js:433:10) at Parser.write (F:\webs\findmystudentdigs\node_modules\mysql\lib\protocol\Parser.js:43:10) at Protocol.write (F:\webs\findmystudentdigs\node_modules\mysql\lib\protocol\Protocol.js:38:16) at Socket. (F:\webs\findmystudentdigs\node_modules\mysql\lib\Connection.js:88:28) at Socket. (F:\webs\findmystudentdigs\node_modules\mysql\lib\Connection.js:526:10) at Socket.emit (events.js:210:5) at addChunk (_stream_readable.js:308:12) -------------------- at Protocol._enqueue (F:\webs\findmystudentdigs\node_modules\mysql\lib\protocol\Protocol.js:144:48) at Connection.query (F:\webs\findmystudentdigs\node_modules\mysql\lib\Connection.js:198:25) at F:\webs\findmystudentdigs\node_modules\knex\lib\dialects\mysql\index.js:135:18 at new Promise () at Client_MySQL._query (F:\webs\findmystudentdigs\node_modules\knex\lib\dialects\mysql\index.js:129:12) at Client_MySQL.query (F:\webs\findmystudentdigs\node_modules\knex\lib\client.js:169:17) at Runner.query (F:\webs\findmystudentdigs\node_modules\knex\lib\runner.js:134:36) at F:\webs\findmystudentdigs\node_modules\knex\lib\runner.js:40:23 at F:\webs\findmystudentdigs\node_modules\knex\lib\runner.js:260:24 at processTicksAndRejections (internal/process/task_queues.js:93:5)”

}

I don’t think paged queries are yet finalized in this beta.

worked perfectly in beta 3, this is code i was using succesfully yesterday in beta 3

2 Likes

Thanks Brian - that’s encouraging.

1 Like