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
ENH: Add type support for java.nio.file.Path ... such that it stores the underlying URI as VARCHAR/string #651
Comments
You need to expand and explain more clearly exactly what is desired. Ebean already supports java.io.File - it streams into a DB Clob or Blob type. |
save file has two way
sometimes, we need save file content to db. and sometimes, we save file path, read system path. so, we need switch save plan. |
Yes, I don't think I like this option 2. of having Ebean store the file I don't see option 2 as a good thing for Ebean to do. Saving the File content however is really good because it handles the ... but no I don't see "2. save file OS location (file path)" as something On 14 April 2016 at 16:28, icode notifications@github.com wrote:
|
save file content to db is low read speed at DB data too large. about support
|
and how to read bytes streaming? not all bytes |
Do you mean how to stream only part of the bytes? You can't, you need to use the java.sql.Clob API to do that. With the File type all the bytes are streamed in and out.
You can just do Path.toFile() in the application of course but sure. Is that what you want this ticket to be? An enhancement request to add support for java.nio.Path? |
|
Is that what you want this ticket to be? An enhancement request to add support for java.nio.Path (just like the current File support) ? |
|
en, like current File support, but |
That is not how File support works. File support is used to stream the content into/out of the DB. It is NOT used to store the file path. If you want Path.toString() etc then no, I will not add support for that as per the prior comments. |
support
save path |
and developer can do not know file how to save, any
|
You understand what I'm saying what? |
I think you want to support the Path type specifically by persisting the URI string value and then converting that back from String to URI to Path. Is that correct? |
yes, but not change code, use see https://docs.oracle.com/javase/8/docs/technotes/guides/io/fsp/filesystemprovider.html and can use api |
|
…stores the underlying URI as VARCHAR/string
…stores the underlying URI as VARCHAR/string
Ok done and pushed. Supports Path ... by translating it into a String via URI to save as VARCHAR. |
I'll close this now. Let me know if that is different to what you expect. |
support java.io.File and java.nio.file.Path save to db.
db data type use
Blob
, can configure save file bytes or file path.add
plan
column can use for witch read file bytes or file path, both plan useand more info last modified, size, filename and more
The text was updated successfully, but these errors were encountered: