-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add an sql exportation #12302
Comments
This is outside the scope of PhantomJS. If there is a need to save some data to any database, that should be done through the usual IPC or file I/O. |
Hi, Thank you Ariya for your answer. I just need it to save states for supervision web features and it 's so easy to add in your source code with Qt :-) A feature required by browsers is "proxy exceptions" (or pac file) could you please add it (pull request : #12131) Best regards |
Yes,I need to persist data to the database. Can I get your code? |
ok add in phantomjs.pro QT += sql network webkit linux* { module/sql.js /_jslint sloppy: true, nomen: true */ /* Copyright (C) 2011 Ariya Hidayat ariya.hidayat@gmail.com Redistribution and use in source and binary forms, with or without
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" function defineSqlSignalHandler(sql, handlers, handlerName, signalName) {
} function isArray(object) function decorateNewSql(opts, sql) {
} exports.createConnection = function (opts) { sql.h /* Copyleft (C) 2014 jef_le_ponot Redistribution and use in source and binary forms, with or without
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" #ifndef SQL_H #include class Sql : public QObject public: public slots: signals: private: #endif // SQL_H sql.cpp /* Copyright (C) 2011 Ivan De Marino ivan.de.marino@gmail.com Redistribution and use in source and binary forms, with or without
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" #include "sql.h" // FileSystem // public slots: bool Sql::_connect(const QVariantMap &config)
} bool Sql::open()
} QString Sql::_query(const QString &request,const QVariantMap &bindValues)
} bool Sql::close() add in phantomjs.cpp #include "sql.h" ... QObject *Phantom::createSql()
} phamtonjs.h #include "sql.h" Example : connection.connect(function(err){ connection.query(SQL_REQUESTS['INSERT_REJEU']['SQL'], connection.end(); |
sorry . sql.h is to be included QSqlDatabase ? You did not write it and I spent a very long time, but have not been able to compile complete. |
Hello, I will integrate my code in the new version of phantomjs 2.0.0 and commit with git Best Regards
Mode, hifi, maison,… J'achète malin. Je compare les prix avec Voila.fr http://shopping.voila.fr/ |
thanks I'm looking forward to Best Regards too ^_^ |
https://github.com/jefleponot/phantomjs/tree/sql you have to connect your own data base |
oh . I have some errors.
I do not have this directory of /usr/bin/ld Other error is fixed, but this I do not know |
For many reasons, it could be useful to save navigation tests in a database system.
So I add qt Libraries (QtSql), sql.cpp and sql.js in my phantomjs version.
So I can save data to mysql or postgre or ...
If somebody want this code, i will commit it.
Have a nice day
JEF
example code :
The text was updated successfully, but these errors were encountered: