annotated icon indicating copy to clipboard operation
annotated copied to clipboard

Check constraintđŸ’¡

Open peldax opened this issue 8 months ago • 3 comments

I have an idea!

Hi,

I would love to add a check constraint to my table using attributes.

I imagine the functionality as following, but it is just a draft.

#[Entity]
#[Index(columns: ['a'], unique: true)]
#[Check(expression: 'a > b')]
class EntityDef
{
    #[Column(type: 'integer')]
    private int $a;
    
    #[Column(type: 'integer')]
    private int $b;
}

I am open to bounty this feature.

peldax avatar Jun 20 '24 21:06 peldax