Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

sql: implement index catalog #179

Merged
merged 1 commit into from
May 4, 2018

Conversation

erizocosmico
Copy link
Contributor

Closes #170

I removed the Status() IndexStatus from the Index interface, since doing that would require a SetStatus and I don't really think we should expose that method.

sql/index.go Outdated
defer r.mut.RUnlock()

id = strings.ToLower(id)
for _, idx := range r.indexes {
Copy link
Contributor

@kuba-- kuba-- Apr 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe indexes can be a map["${db}.${id}"]Index (if id is unique per db) so we can speed up a lookup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to iterate anyway for the IndexByExpression, but ok, we can speed up getting by key.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico erizocosmico force-pushed the feature/index-catalog branch from fb2780b to c2f9e5c Compare May 3, 2018 09:16
@erizocosmico
Copy link
Contributor Author

Done @kuba--

@ajnavarro
Copy link
Contributor

@kuba-- @erizocosmico shall we merge this?

@erizocosmico
Copy link
Contributor Author

SGTM

@ajnavarro ajnavarro merged commit c0784a9 into src-d:master May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants