Matches constraint??

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Matches constraint??

skavanagh
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Matches constraint??

bserdar
Looks ok, with the exception that parsing the regex is done in
validator. That means the regex will be parsed for every instance of
the constraint for every doc. Not good.

Could you change the implementation so that a Pattern is stored in the
MatchesConstraint, instead of the validator, and the validator then
retrieves the Pattern instance from the constraint object? Also,
MatchesConstraint can throw exceptions if regex cannot be parsed,
which then translates into metadata parser exceptions, so the metadata
maintainer would know a screwup before it is run against live data.

After that, we can merge this in. Whether it makes it into 1.0.0 needs
to be discussed.

On Mon, Aug 18, 2014 at 4:52 PM, skavanagh [via lightblue-dev]
<[hidden email]> wrote:

> It maybe taking constraints a little too far, but it could be a neat way of
> forcing data integrity.
>
> https://github.com/lightblue-platform/lightblue-core/pull/109
>
> (Sorry for the messy pull requests.  I thought if I branched my previous
> changes, and reset my master to the upstream, it would treat my new changes
> as a separate pull request.  ..but, I guess it always has to be a new
> branch)
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://lightblue-dev.1011138.n3.nabble.com/Matches-constraint-tp55.html
> To start a new topic under lightblue-dev, email
> [hidden email]
> To unsubscribe from lightblue-dev, click here.
> NAML
Reply | Threaded
Open this post in threaded view
|

Re: Matches constraint??

jewzaam
Administrator
Re: 1.0.0 release, we'll just take what is in master.  So if it's merged, it's in.  No reason not to include all accepted (aka merged) PR's.


On Tue, Aug 19, 2014 at 9:42 AM, bserdar [via lightblue-dev] <[hidden email]> wrote:
Looks ok, with the exception that parsing the regex is done in
validator. That means the regex will be parsed for every instance of
the constraint for every doc. Not good.

Could you change the implementation so that a Pattern is stored in the
MatchesConstraint, instead of the validator, and the validator then
retrieves the Pattern instance from the constraint object? Also,
MatchesConstraint can throw exceptions if regex cannot be parsed,
which then translates into metadata parser exceptions, so the metadata
maintainer would know a screwup before it is run against live data.

After that, we can merge this in. Whether it makes it into 1.0.0 needs
to be discussed.

On Mon, Aug 18, 2014 at 4:52 PM, skavanagh [via lightblue-dev]
<[hidden email]> wrote:

> It maybe taking constraints a little too far, but it could be a neat way of
> forcing data integrity.
>
> https://github.com/lightblue-platform/lightblue-core/pull/109
>
> (Sorry for the messy pull requests.  I thought if I branched my previous
> changes, and reset my master to the upstream, it would treat my new changes
> as a separate pull request.  ..but, I guess it always has to be a new
> branch)
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://lightblue-dev.1011138.n3.nabble.com/Matches-constraint-tp55.html
> To start a new topic under lightblue-dev, email
> [hidden email]
> To unsubscribe from lightblue-dev, click here.
> NAML



If you reply to this email, your message will be added to the discussion below:
http://lightblue-dev.1011138.n3.nabble.com/Matches-constraint-tp55p57.html
To start a new topic under lightblue-dev, email [hidden email]
To unsubscribe from lightblue-dev, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Matches constraint??

bserdar
Not in master yet. Lets include in the next release.

On Tue, Aug 19, 2014 at 11:50 AM, jewzaam [via lightblue-dev]
<[hidden email]> wrote:

> Re: 1.0.0 release, we'll just take what is in master.  So if it's merged,
> it's in.  No reason not to include all accepted (aka merged) PR's.
>
>
> On Tue, Aug 19, 2014 at 9:42 AM, bserdar [via lightblue-dev] <[hidden
> email]> wrote:
>>
>> Looks ok, with the exception that parsing the regex is done in
>> validator. That means the regex will be parsed for every instance of
>> the constraint for every doc. Not good.
>>
>> Could you change the implementation so that a Pattern is stored in the
>> MatchesConstraint, instead of the validator, and the validator then
>> retrieves the Pattern instance from the constraint object? Also,
>> MatchesConstraint can throw exceptions if regex cannot be parsed,
>> which then translates into metadata parser exceptions, so the metadata
>> maintainer would know a screwup before it is run against live data.
>>
>> After that, we can merge this in. Whether it makes it into 1.0.0 needs
>> to be discussed.
>>
>> On Mon, Aug 18, 2014 at 4:52 PM, skavanagh [via lightblue-dev]
>> <[hidden email]> wrote:
>>
>> > It maybe taking constraints a little too far, but it could be a neat way
>> > of
>> > forcing data integrity.
>> >
>> > https://github.com/lightblue-platform/lightblue-core/pull/109
>> >
>> > (Sorry for the messy pull requests.  I thought if I branched my previous
>> > changes, and reset my master to the upstream, it would treat my new
>> > changes
>> > as a separate pull request.  ..but, I guess it always has to be a new
>> > branch)
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the discussion
>> > below:
>> > http://lightblue-dev.1011138.n3.nabble.com/Matches-constraint-tp55.html
>> > To start a new topic under lightblue-dev, email
>> > [hidden email]
>> > To unsubscribe from lightblue-dev, click here.
>> > NAML
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://lightblue-dev.1011138.n3.nabble.com/Matches-constraint-tp55p57.html
>> To start a new topic under lightblue-dev, email [hidden email]
>> To unsubscribe from lightblue-dev, click here.
>> NAML
>
>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://lightblue-dev.1011138.n3.nabble.com/Matches-constraint-tp55p63.html
> To start a new topic under lightblue-dev, email
> [hidden email]
> To unsubscribe from lightblue-dev, click here.
> NAML
Reply | Threaded
Open this post in threaded view
|

Re: Matches constraint??

skavanagh
In reply to this post by bserdar
CONTENTS DELETED
The author has deleted this message.