Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,在 Nodejs 中你有path.sep,在 Java 中你有File.separator. 你在mysql中有类似的东西吗?如果不是,那么在任何操作系统中都可以使用哪种方式处理路径分隔符的最佳方法是什么?
path.sep
File.separator
我需要它,这样我就可以将正确的路径传递给 LOAD_FILE() 函数,而不必担心当前的操作系统。
我发现我可以在参数化查询中传递path.sepor的值:File.separator
"insert into MY_TABLE (file_contents) values (LOAD_FILE(?))", my_folder+File.separator+filename
不是我真正想要的,但至少对我有用。