Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Updated db C++ API for string type primary key #501

Merged
merged 1 commit into from
Sep 26, 2017
Merged

Updated db C++ API for string type primary key #501

merged 1 commit into from
Sep 26, 2017

Conversation

pavybez
Copy link

@pavybez pavybez commented Sep 26, 2017

Updated db C++ API with new implementation for defining VarTable that can take String as primary key or any other object in future.

@pavybez pavybez changed the title Updated db C++ API with VarTable for string type primary key Updated db C++ API for string type primary key Sep 26, 2017
@pavybez pavybez requested a review from elmato September 26, 2017 04:09
struct table_impl_obj {};

template<>
struct table_impl_obj<char*> {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should define a string class and not use char* as strings in c++ apis.

Copy link
Contributor

@bytemaster bytemaster left a comment

Choose a reason for hiding this comment

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

I am approving this for now because it "works", but I think we should revise it to use a string class in C++ interface rather than having to use STRLEN everywhere. STRLEN only works for null terminated strings and will break for UTF8.

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