Skip to content

Commit 0d250bc

Browse files
Merge pull request #272 from guzman-raphael/handle-attach
Update user tables and test
2 parents a9f6a03 + 17c85e2 commit 0d250bc

File tree

9 files changed

+31
-4
lines changed

9 files changed

+31
-4
lines changed

+dj/+internal/TableAccessor.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
tierClass = dj.Schema.tierClasses{2}; % default to Manual table
3131
for k=1:numel(dj.Schema.tierPrefixes)
3232
tierCharLen = length(dj.Schema.tierPrefixes{k});
33-
if tierCharLen > 0 && ~isempty(regexp(dj.Schema.tierPrefixes{k}, tableName(1:tierCharLen), 'ONCE'))
33+
if tierCharLen > 0 && ~isempty(regexp(dj.Schema.tierPrefixes{k}, ...
34+
tableName(1:tierCharLen), 'ONCE'))
3435
tierClass = dj.Schema.tierClasses{k};
3536
break;
3637
end

+dj/+internal/UserRelation.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
classdef UserRelation < dj.Relvar & dj.internal.Master
2+
methods
3+
function self = UserRelation(varargin)
4+
[email protected](varargin{:})
5+
end
6+
end
27
end

+dj/Computed.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
classdef Computed < dj.internal.AutoPopulate
22
% defines a computed table
3+
methods
4+
function self = Computed(varargin)
5+
[email protected](varargin{:})
6+
end
7+
end
38
end

+dj/Imported.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
classdef Imported < dj.internal.AutoPopulate
22
% defines an imported table
3+
methods
4+
function self = Imported(varargin)
5+
[email protected](varargin{:})
6+
end
7+
end
38
end

+dj/Jobs.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
classdef Jobs < dj.Relvar
2+
methods
3+
function self = Jobs(varargin)
4+
[email protected](varargin{:})
5+
end
6+
end
27
end

+dj/Lookup.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
% defines a lookup table
33

44
methods
5-
function self = Lookup()
5+
function self = Lookup(varargin)
6+
[email protected](varargin{:})
67
if isprop(self, 'contents')
78
if length(self.contents) > count(self)
89
self.inserti(self.contents)

+dj/Manual.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
classdef Manual < dj.internal.UserRelation
22
% Defines a manual table
3+
methods
4+
function self = Manual(varargin)
5+
[email protected](varargin{:})
6+
end
7+
end
38
end

tests/TestSchema.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function TestSchema_testUnsupportedDJTypes(testCase)
2828
' X''1d751e2e1e74faf84ab485fde8ef72ca''),' ...
2929
'(X''1d751e2e1e74faf84ab485fde8ef72bf'', 2, ''attach_name'', ''filepath'',' ...
3030
'X''1d751e2e1e74faf84ab485fde8ef72cb'')']);
31-
c1.query(['insert into `' testCase.PREFIX '_' lower(package) '`.`document` ' ...
31+
c1.query(['insert into `' testCase.PREFIX '_' lower(package) '`.`#document` ' ...
3232
'values (' num2str(id) ', ''raphael'', ''hello'',' ...
3333
'X''1d751e2e1e74faf84ab485fde8ef72be'',' ...
3434
'X''1d751e2e1e74faf84ab485fde8ef72bf'')']);

tests/test_schemas/+External/Document.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
document_data2 : attach@main
88
document_data3 : filepath@main
99
%}
10-
classdef Document < dj.Manual
10+
classdef Document < dj.Lookup
1111
end

0 commit comments

Comments
 (0)