user_tables.py
Hosts the table tiers, user relations should be derived from.
Computed
¶
Bases: UserTable
, AutoPopulate
Inherit from this class if the table's values are computed from other relations in the schema.
The inherited class must at least provide the function _make_tuples
.
Source code in datajoint/user_tables.py
165 166 167 168 169 170 171 172 |
|
Imported
¶
Bases: UserTable
, AutoPopulate
Inherit from this class if the table's values are imported from external data sources.
The inherited class must at least provide the function _make_tuples
.
Source code in datajoint/user_tables.py
155 156 157 158 159 160 161 162 |
|
Lookup
¶
Bases: UserTable
Inherit from this class if the table's values are for lookup. This is currently equivalent to defining the table as Manual and serves semantic purposes only.
Source code in datajoint/user_tables.py
142 143 144 145 146 147 148 149 150 151 152 |
|
Manual
¶
Bases: UserTable
Inherit from this class if the table's values are entered manually.
Source code in datajoint/user_tables.py
133 134 135 136 137 138 139 |
|
Part
¶
Bases: UserTable
Inherit from this class if the table's values are details of an entry in another relation and if this table is populated by this relation. For example, the entries inheriting from dj.Part could be single entries of a matrix, while the parent table refers to the entire matrix. Part relations are implemented as classes inside classes.
Source code in datajoint/user_tables.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
|
delete(force=False)
¶
unless force is True, prohibits direct deletes from parts.
Source code in datajoint/user_tables.py
220 221 222 223 224 225 226 227 228 229 |
|
drop(force=False)
¶
unless force is True, prohibits direct deletes from parts.
Source code in datajoint/user_tables.py
231 232 233 234 235 236 237 238 239 240 |
|
TableMeta
¶
Bases: type
TableMeta subclasses allow applying some instance methods and properties directly at class level. For example, this allows Table.fetch() instead of Table().fetch().
Source code in datajoint/user_tables.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
UserTable
¶
Bases: Table
A subclass of UserTable is a dedicated class interfacing a base relation. UserTable is initialized by the decorator generated by schema().
Source code in datajoint/user_tables.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
definition()
property
¶
:return: a string containing the table definition using the DataJoint DDL.
Source code in datajoint/user_tables.py
99 100 101 102 103 104 105 106 |
|
table_name()
¶
:return: the table name of the table formatted for mysql.
Source code in datajoint/user_tables.py
112 113 114 115 116 117 118 119 |
|