Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reorder_table_column [2013/08/09 19:36]
127.0.0.1 external edit
reorder_table_column [2026/08/28 03:31] (current)
hermann Sync from local documentation review
Line 3: Line 3:
 ===== Description ===== ===== Description =====
  
-Move a column to a new position+Moves specified ​column ​of a table to a new position.
- +
-It is possible to move key or data columns. However, data columns can not be moved to a position occupied by a key column or vice-versa.+
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Table  | [[Table Type|Table]]  | The input table.  | +| Table  | [[Table Type]] ​ | Table whose column will be reordered.  | 
-| Column Index Or Name  | [[Index Or Name Type|Index Or Name]]  | Index or name of the column to be moved. ​ | +| Column Index Or Name  | [[Index Or Name Type]] ​ | Index or name of the column to be moved. The first, i.e. the leftmost, column has index 1.  | 
-| New Column Index  | [[Non Negative ​Int Type|Non Negative Int]]  | Column index where the specified ​column will be re-inserted. The column currently ​located ​at this position ​(and all following ​columns) is shifted ​to the next position. The use of 0 forces the column ​to become either the last table column or the last key column.  |+| New Column Index  | [[Non Negative ​Integer Value Type]] ​ | Index of the column at which the moved column will be re-inserted. The column currently at this positionand all columns ​after it, are shifted ​one position to make room.  | 
 + 
 +===== Optional Inputs ===== 
 + 
 +None.
  
 ===== Outputs ===== ===== Outputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Result ​ | [[Table Type|Table]]  | The resulting table. ​ |+| Result ​ | [[Table Type]] ​ | The resulting table with the column moved to its new position.  |
  
 ===== Group ===== ===== Group =====
  
-[[Functor List#​Table|Table]]+[[Functor List#Table | Table]]
  
 ===== Notes ===== ===== Notes =====
  
-Key and data columns ​can not be mixed. Thus, it is not possible to move a data column to a position occupied by a key column and vice-versa.+Key columns ​and data columns ​cannot ​be mixeda data column ​cannot be moved to a position occupied by a key columnand vice versa.
  
-If a key column is being moved to a position occupied by a data column or if a data column is being moved to a position occupied by a key column, the column is moved to the position immediately after the last key column.+If a key column is moved to a position occupied by a data columnor a data column is moved to a position occupied by a key column, the column is instead ​moved to the position immediately after the last key column ​(equivalently,​ immediately before the first data column).
  
-The position ​means the last key column ​or the last data column, depending on the column being moved.+A New Column Index of moves the column to the last position among key columns ​or data columns, depending on which kind of column ​is being moved.
  
 ===== Internal Name ===== ===== Internal Name =====