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
adodb-datadict: adding of comments to tables and fields is missing #256
Comments
The <descr> tag can be used for commenting table and fields, see xmlschema03.dtd of AdoDB. The mysldump I got from floele a year ago included sql table comments, but not existend in Flyspray github source. So then just lets add them to flyspray-install.xml too. We can enhance and completion can be done. Note: <descr> tags in xmlschemas are currently ignored by adodb 5.20.4. (because not yet implemented, but you can vote for ADOdb/ADOdb#256 it. ) :-) Purpose is having DBschema documention in the Flyspray source too. And in future also in the database too.
Have you considered adding the missing core functions yourself to move this issue along? |
How do you mean that? Should I start working on it and do pull request? |
Yes most certainly, if you have the expertise and the time to build the addcommentsql() methods for any of MySQL, postgres and SQLite drivers that you mention above, we would be more than happy to pull them into the development branch |
I'm still waiting for review of #424, #425, and #265 Other blockers:
So I'm writing tests (primarly xmlschema) so we can get the big pictures across db types what works and what not/missing. |
@peterdd , there are currently no modern, standardized, automated tests that can be successfully applied to this product, across all databases, and as you yourself have noted, the tests/* product are weak and inflexible. That you are focusing on building a standardized test platform is great, and given the time constraints that @dregad and myself are under, you would find us extremely accommodating if you were able to come up with anything based on any well known testing platform. That being said, adding something as granular as the addCommentSql() would likely not interfere with any of the other pull requests that you have mentioned, and merely adding support for the postgres database to further your own work on other projects would be entirely acceptable. We recognize that nobody can hope to be able to cross-database test across the 20 or so supported platforms, and that addition of feature support has always been incremental, so if you need a working addCommentSql() method in the postgres driver, either for a current need or simply to further your work on testing, then you should go ahead and add it, then ask for a pull. Don't worry about the other drivers, or whether the code conforms to xyz standards or whether it will pass an abc system test, those things are to be concerned about in the future. |
Please keep it open as it is not implemented yet. Whenever I started I stumbled over other issues that needs to be fixed first... I probably do some simple PR first, step by step. Maybe some function names and parameter changes need to be discussed too. |
addColumSQL()
alterColumnSQL()
changeTableSQL()
Postgresql: https://www.postgresql.org/docs/9.1/static/sql-comment.html
(extra sql command separated from create table definitions)
Mysql: http://dev.mysql.com/doc/refman/5.7/en/create-table.html
(at end of a field definition; at end of table definition)
Sqlite: http://stackoverflow.com/questions/7426205/sqlite-adding-comments-to-tables-and-columns
(seems to be possible with a workaround of sql comments (-- commenttext ) on the line behind table or field definition)
What I try to achieve: add comments to table and field definitions in an xmlschema03.xml, so a database created based on this xml contains all the comments and so is selfdocumenting.
This is supported by xmlschema03.dtd :
test/xmlschema03-test1.php
Methods setCommentSQL() and getCommentSQL() exists in adodb-datadict.inc.php as stub, but only datadict/datadict-oci.php adds some real code.
The text was updated successfully, but these errors were encountered: