[MDEV-394] User-friendly syntax for dynamic columns Created: 2012-07-12 Updated: 2013-05-01 Resolved: 2012-08-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Description |
|
(These are the notes taken from discussion with serg) The idea is to make syntax more user-friendly: allow "direct" access to dynamic
This can be made to work via a "field discovery" process, similar to a table discovery.
After a column is resolved, a Field object is created for it, record[0] and read_map/etc are expanded accordingly and the rest of the server code doesn't see any difference between dynamically and statically declared columns. DDL for tables with dynamic columnsThere are two possibilities. 1. One can explicitly declare a table as having dynamic columns:
Or
And here's a way to specify default column type for dynamic columns (see "a special case" above)
2. One does not need to declare anything specially. If the engine supports dynamic columns (e.g. storage engine, based on a NoSQL database) - they are always available. If the engine does not support them - they aren't available. This does not work very well if we'll have a default implementation in the handler class. various concerns
|
| Comments |
| Comment by roberto spadim [ 2013-05-01 ] |
|
maybe using :: could tell parser that this field is a dynamic column field? update some_table set delete from some_table it's easy to understand, not? |
| Comment by roberto spadim [ 2013-05-01 ] |
|
What to do for SELECT *? How to see all columns in a row? use LIST_COLUMNS function? just some ideas, may be more tools using :: or other special combination select column::keys from some_table where id=xxx (return key=>value) i'm thinking like a php programmer (array_values, array_keys functions) just some ideas |