-
Notifications
You must be signed in to change notification settings - Fork 0
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
[REQ] [ByName]AsBytes #4
Comments
EMBT tried to remove strings, then introuced them back. I just looked into all them - TSQLDA.SetAsRawByteString and TSQLDA.GetAsRawByteString and TSQLResult.GetAsRawByteString and TSQLParams.SetAsRawByteString a bit too many copy-paste already and i am not sure how to properly make the .SetAsBytes routine with all the non-blob and non-char types. not for a fast hack, definitely :-) |
I've done it already in this way for only SQL_TEXT and SQL_VARYING types. Read/WriteBlob already have methods for Pointers. |
Quick and ugly hack, for a whie
|
But blobs are not regular fields, they are not numbers, they ae not dates, etc.... However, thanks for reminding me, for consistency i would have to look into it too |
Used by me ATM (removed double copy Data -> RBS -> Bytes):
|
i just don't want to have a special case there for only char/varchar/blob could have make some sense, if you would enforce "raw binary" condition: only OCTET for strings, only BINARY for blobs. But you do not. Also, what about connection charset? if lc_type=NONE - then ALL string fields or blobs are de facto binary in this session, even if they are textual in the database. So, checking for "only raw binary fields/blobs" becomign yet more complex and fragile. Thus, all types to be supported, to implement it properly. |
the problem with RawByteString is not that EMBT may deprecate it, buut rather that Henri still takes it as human-readable text and fills it with functions like not that with Delphi insanity about "assignment-compatible types" he could do any different. however for TBytes it realyl should be different, really shuld be just a dumb bytes dump i'd use TValue, but what about older Delphi? :-) |
TBytes казалось бы давно была, даже раньше всяких TByteDynArray :-) Разница именно в кодировках, в передаче таких переменных на вход функциям, принимающих Wide- UnicodeString. Потому rawBYTEstream, да. У TBytes и прочих дин-массивов есть одна особенность, отсутствие COW-семантики. |
Is it possible to add properties Fields.ByNameAsBytes : TBytes and Fields.AsBytes : TBytes for accessing Char|VarChar fields with OCTETS encoding? Since RawByteString is not always suitable (and is not recommended for use by Embarcadero).
The text was updated successfully, but these errors were encountered: