Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OBITools3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OBITools
OBITools3
Commits
3319ede8
Commit
3319ede8
authored
Feb 22, 2017
by
Celine Mercier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Views: Column dictionaries now store and return pointers on column
pointers instead of column pointers.
parent
fc20b83a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
src/obiview.c
src/obiview.c
+5
-13
src/obiview.h
src/obiview.h
+1
-1
No files found.
src/obiview.c
View file @
3319ede8
...
...
@@ -798,7 +798,7 @@ static int create_column_dict(Obiview_p view)
return
-
1
;
}
if
(
ht_set
(
view
->
column_dict
,
(((
view
->
infos
)
->
column_references
)[
i
]).
alias
,
(
view
->
columns
)
[
i
]
)
<
0
)
if
(
ht_set
(
view
->
column_dict
,
(((
view
->
infos
)
->
column_references
)[
i
]).
alias
,
(
view
->
columns
)
+
i
)
<
0
)
{
obi_set_errno
(
OBIVIEW_ERROR
);
obidebug
(
1
,
"
\n
Error adding a column in a column dictionary"
);
...
...
@@ -2032,8 +2032,8 @@ int obi_view_add_column(Obiview_p view,
const
char
*
indexer_name
,
const
char
*
associated_column_name
,
obiversion_t
associated_column_version
,
const
char
*
comments
,
bool
create
)
// all infos for creation or open
const
char
*
comments
,
bool
create
)
// all infos for creation or open
{
int
i
;
OBIDMS_column_p
column
;
...
...
@@ -2199,21 +2199,13 @@ int obi_view_delete_column(Obiview_p view, const char* column_name)
OBIDMS_column_p
obi_view_get_column
(
Obiview_p
view
,
const
char
*
column_name
)
{
return
(
OBIDMS_column_p
)(
ht_get
(
view
->
column_dict
,
column_name
));
return
(
OBIDMS_column_p
)(
*
((
OBIDMS_column_p
*
)(
ht_get
(
view
->
column_dict
,
column_name
))
));
}
OBIDMS_column_p
*
obi_view_get_pointer_on_column_in_view
(
Obiview_p
view
,
const
char
*
column_name
)
{
int
i
;
for
(
i
=
0
;
i
<
(
view
->
infos
)
->
column_count
;
i
++
)
{
if
(
strcmp
((((
view
->
infos
)
->
column_references
)[
i
]).
alias
,
column_name
)
==
0
)
return
((
view
->
columns
)
+
i
);
}
obidebug
(
1
,
"
\n
Error: column not found"
);
return
NULL
;
return
(
OBIDMS_column_p
*
)(
ht_get
(
view
->
column_dict
,
column_name
));
}
...
...
src/obiview.h
View file @
3319ede8
...
...
@@ -119,7 +119,7 @@ typedef struct Obiview {
OBIDMS_column_p
columns
[
MAX_NB_OPENED_COLUMNS
];
/**< Array of pointers on all the columns of the view.
*/
hashtable_p
column_dict
;
/**< Hash table storing the pairs of column names or aliases with the associated
*
column pointers
.
*
pointers on column pointers (OBIDMS_column_p*)
.
*/
int
nb_predicates
;
/**< Number of predicates to test when closing the view.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment