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

TEXT fields return NSData objects rather than NSString #12

Open
EricShapiro opened this issue May 3, 2018 · 2 comments
Open

TEXT fields return NSData objects rather than NSString #12

EricShapiro opened this issue May 3, 2018 · 2 comments

Comments

@EricShapiro
Copy link

What did you do?

Issued a SELECT from a table with TEXT fields

What happened instead?

The TEXT values came back as NSData types

What did you expect?

I expected the fields to be of type NSString. Seems like NSString is the obvious matching for a TEXT field. The field was utf8 encoded in the database.

OHMySQL Environment

  • OHMySQL version: 2.1.3 (March 2018)
  • Xcode version: 9.2
  • Swift version: (if applicable, if not remove)
  • Platform(s) running OHMySQL: OSX 10.13.3

Demo Project

Don't have a demo project yet. It's not hard to work-around the issue, but maybe it would be nice to have an option to map TEXT to NSString rather than NSData?

@oleghnidets
Copy link
Owner

Hi there,
Thank you for reporting. I will take a look ASAP as for now I have limited time.

@oleghnidets
Copy link
Owner

oleghnidets commented Jun 11, 2018

Hi there,

Anyone, take a look at release https://github.com/oleghnidets/OHMySQL/releases/tag/2.1.2

TEXT type is treated as BLOB. Therefore, it is mapped to NSData. Please, consider it in your code.

Anyway I will be looking for better solution.

@oleghnidets oleghnidets added this to Feature in OHMySQL 3.0 Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
OHMySQL 3.0
  
Feature
Development

No branches or pull requests

2 participants