fragmatyc / SDFL

Simple Data Fix Language
1 stars 2 forks source link

Determine operators #9

Open fragmatyc opened 8 years ago

fragmatyc commented 8 years ago

We should determine the operators we want to implement. For now, they are:

insert into MY_TABLE using template 
  "My Value 1" -> MY_COLUMN_1;

When we get to this point, we should chose the other operators. We should keep in mind that we want to stick to SQL syntax, but make it easier to read or simplify the code. For example, the arrow operator was created to avoid the separation between the value and the column in an insert statement:

insert into
  MY_TABLE (
    COLUMN_1, -- Column mapped with --+
    COLUMN_2, --                      |
    COLUMN_3, --                      |
    COLUMN_4) --                      |
values (      --                      |
  'Test 1',   -- <-- Value -----------+
  'Test 2', 
  'Test 3', 
  'Test 4');
Cpt-xx commented 8 years ago

I have to admit that using the arrow assignment operator is more readable than the standard SQL insert into syntax, as it expresses a more direct link between value and field.