Ticket #238 (closed enhancement: fixed)

Opened 15 months ago

Last modified 12 months ago

MySQL Adapter: Database Field Comments

Reported by: basilieus Owned by: somebody
Priority: minor Milestone: 1.1
Component: Codegen Version: 1.0.0 Stable
Keywords: Cc:

Description

I made a little deal where it adds the comment for field names into the comments for the variables inside the class.

So if you added a comment on a field in MySQL (not tested on anything else) it will add that comment to the class file (above the variable).

Check it out.

Attachments

ticket_238.patch (8.1 kB) - added by basilieus 15 months ago.
patch238_v2.patch (8.8 kB) - added by alex94040 13 months ago.
New patch

Change History

Changed 15 months ago by basilieus

Changed 15 months ago by VexedPanda

Very cool. I wonder if there's a way to pull that info into the form drafts too.

Changed 15 months ago by alex94040

  • status changed from new to in_QA

This is absolutely awesome. I'm very much looking forward to it in the core.

Side note: please add a comment to one of the examples to let people know about this functionality.

Changed 13 months ago by alex94040

  • summary changed from [Enhancement] Database Field Comments to MySQL Adapter: Database Field Comments

I just tested this out. I had to make small mods to QMySqliDatabase.class.php - changing the way the Comment is retrieved from the DB - as it was crashing on my box. Now it's fine. Everything else works like a charm.

Note that this feature only works on the MySQL adapter - for all other adapters, the comment will be ignored. I'd love to see other adapters implement this, too - the core plumbing is already there.

Uploading the new patch; leaving it around for a few days to let others comment, and let's check this puppy in!

Changed 13 months ago by alex94040

New patch

Changed 13 months ago by akrohn

When this is checked in, I would take a look to adapt it for the SQL Server adapter.

Changed 13 months ago by VexedPanda

Has this been tested with all 3 MySql adapters?

Changed 13 months ago by alex94040

No, it has not. Whoever tests/code reviews this, please check with all 3 versions of the adapter.

Changed 12 months ago by MikeHostetler

  • status changed from in_QA to closed
  • resolution set to fixed

(In [482]) Fixes #238, code by basilieus and alex94040, review by MikeHostetler?

Note: See TracTickets for help on using tickets.