Skip to content
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

Added includes section + full name matching #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SirFlex
Copy link

@SirFlex SirFlex commented Apr 20, 2015

Hi,

I added the include section in confuguration file, that allows to include excluded objects.

Also, object name to pattern matching extended for full object name.
I mean: full_object_name := schema_name.object_name

A hope these improvements would be useful for base fork.

1. Added includes section in configuration file, that allows to include excluded objects.
2. Object name to pattern mathing extended for full name: <full_object_name> := <schema_name>.<object_name>
@arno82
Copy link
Collaborator

arno82 commented Apr 20, 2015

Hi.
I have a few questions :-)

Could it be that scheme2ddl.config.xml with examples for the includes is missing?

Why do you want to include objects that are defined in the excludes section of scheme2ddl.config.xml ?
You could also use -tf and -tfm to get some specific DDL objects and empty your exclude section in the scheme2ddl.config.xml file.

@SirFlex
Copy link
Author

SirFlex commented Apr 20, 2015

Hi, I'm weak in Spring... my implementation requires includes. If you know, how make include not necessary, I'll be grateful for advice.
"You could also use -tf and -tfm to get some specific DDL objects "... yes, but by object type only. But I need to include only some objects by name. That's why i added includes in config file.

@arno82
Copy link
Collaborator

arno82 commented Apr 20, 2015

Ah ok, so you want to exclude for example every TYPE BODY, except for some named ones in an include list.
I see your point.

Maybe you can modifiy the exclude value section to fit your needs withsome regex magic?
< util:map id="excludes">
< entry key="TYPE BODY">
< set>
< value>((?!json))(|)((?!text_dlist))*< /value>
< /set>
< /entry>

This will exclude everything from the exclude that start with json or starts with text_dlist :-)

PS: Had to put an whitespace after every < otherwise the comment wouldn't appear...

@SirFlex
Copy link
Author

SirFlex commented Apr 20, 2015

Thank you, but "regex magic" is too difficult in usage... especially when a number of objects to include is great.
I want to extends the initial idea that objects may be excluded and... included by specifiing their names (or patterns for their names)
(Sorry for my weak English)

@qwazer
Copy link
Owner

qwazer commented Apr 20, 2015

Hello, SirFlex and Arno!
Thanks for pull request and discussing.

I try to keep scheme2ddl simple as possible and keep backward compatibility. (But I accidentally broke this in recent versions 😕 ).

I'm not sure, that a lot of options and a lot of various ways for include/exclude functionality is good for keeping it simple.

From this point, Arno, I doubted about #27 but I accepted it in respect for your contributing.

I didn't decide yet what to do with this pull request. I'll think about it.

Thanks in any case 👍

1. encoding for output files (specify option '-e' or '--encoding' in command line or encoding property for "writer" bean in configuration file). Default value is VM default character set.
2. clean output directory - if specified then output direcory cleaned before running ddl generation process (specify option '--clean' in command line or set cleanOutputDirecotry for "writer" bean in configuration file). Default value is false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants