So, I didn't want necessarily to rewrite everythin...
# core
s
So, I didn't want necessarily to rewrite everything now, although in the past we talked about moving away from the spec files and writing the tables directly in C++, so that we have a bit more flexibility. But for the short term I think I find that we do have what we need except for platform specific stuff. I think that some issues should be resolved (or can only be resolved) by changing which columns the table has. You were talking about the annoyance of not being able to do cross-platform queries, indeed this is partially touching what I was talking about, Take a query that joins users and groups via
gid
. The problem is that
gid
is not really used for filtering on Windows API's. We still retrieve it as the RID of the SID representing the group, and that
gid
is present on both users and groups tables. The problem comes though when you do a JOIN between users and groups. For each user you have, the groups table has to return all the groups everytime, this is because
gid
cannot be used for filtering. The
groups
table has a
group_sid
column which could be used for filtering (needs to be implemented), but it's missing in the
users
table. Now suppose that we were going to implement such filtering, now all the queries that want to join users and groups on Windows only, should change and use that other column. The alternative is that we should use a more generic column name, just
group_id
and on POSIX platforms that's the gid, but on Windows that's the sid. Obviously that partially hides what that column really is but permits to do a bit more generic queries.