You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The python syntax is (according to the documentation) -> Table.project(new_attr='old_attr')
so I'm assuming that the analogous syntax in MATLAB is -> [nullable, unique] ClassName.TableName.proj(new_attr1='old_attr1', new_attr2='old_attr2')
This matches the current Python syntax for sql math (as in the autoincrement example for primary keys) next='max(scan_idx)+1'
though the syntax in Raphael's comment above better matches the current working syntax for autoincrement in MATLAB: key.scan_idx = fetch1(Scan & key, 'max(scan_idx)+1 -> next')
The table definition syntax is more flexible than the syntax for executable MATLAB code, because it is interpreted by the DJ Toolbox parser (from the block comment) rather than the MATLAB language parser. So the new='old' format can work in the table definition in MATLAB, but the next='max(scan_idx)+1' will not work in executable code.
Probably worth a discussion before the individual cases get handled differently...
Feature Request
Problem
Foreign key definition does not match newer syntax implemented in
datajoint-python
.Currently it observes:
Expected to accept:
Requirements
Ensure the above expected syntax is respected.
Justification
Feature parity with
datajoint-python
.The text was updated successfully, but these errors were encountered: