Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow strings as well as char #431

Open
bartkrekelberg opened this issue Mar 17, 2023 · 2 comments
Open

Allow strings as well as char #431

bartkrekelberg opened this issue Mar 17, 2023 · 2 comments
Labels
awaiting-triage Issues awaiting proper priority/milestone assignment. enhancement

Comments

@bartkrekelberg
Copy link

Feature Request

Problem

On line 867 of dj.internal.Relvar attr.isString is equated with ischar(),, which disallows the use of Matlab strings .
A simple fix would be to write
assert(ischar(value) || isstring(value), ...
instead.

This has worked fine for me, but I did not check whether using string instead of char leads to problems elsewhere in the DJ code.

Requirements

Ideally, it should be possible to use string and vector of char interchangeably.

Justification

Alternative Considerations

Do you currently have a work-around for this? Provide any alternative solutions or features you've considered.

Related Errors

Add any errors as a direct result of not exposing this feature.

Please include steps to reproduce provided errors as follows:

  • OS (WIN | MACOS | Linux)
  • MATLAB Version ; R2022b
  • MySQL Version
  • MySQL Deployment Strategy (local-native | local-docker | remote)
  • DataJoint Version 3.5.0
  • Minimum number of steps to reliably reproduce the issue
  • Complete error stack as a result of evaluating the above steps

Screenshots

If applicable, add screenshots to help explain your feature.

Additional Research and Context

Add any additional research or context that was conducted in creating this feature request.

For example:

  • Related GitHub issues and PR's either within this repository or in other relevant repositories.
  • Specific links to specific lines or a focus within source code.
  • Relevant summary of Maintainers development meetings, milestones, projects, etc.
  • Any additional supplemental web references or links that would further justify this feature request.
@bartkrekelberg bartkrekelberg added awaiting-triage Issues awaiting proper priority/milestone assignment. enhancement labels Mar 17, 2023
@bartkrekelberg bartkrekelberg changed the title Allow strings instead of char Allow strings as well as char Mar 17, 2023
@guzman-raphael
Copy link
Collaborator

@bartkrekelberg Thanks for your suggestion! This request seems reasonable and has come up before. One important consideration would be to ensure interoperability with DataJoint Python i.e. verify we can fetch the new records from DJ Python when inserted using DJ MATLAB.

If you are interested in taking this on by contribution, we'd be happy to help you along.

@bartkrekelberg
Copy link
Author

I can give it a try. I forked the repo, do you want me to issue pull requests on the master or on some other development branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-triage Issues awaiting proper priority/milestone assignment. enhancement
Projects
None yet
Development

No branches or pull requests

2 participants