Py学习  »  问与答

官方文档的一段英文翻译求解惑

cumt_ttr • 9 年前 • 4940 次点击  

原文链接->Table name quoting for Oracle

Table name quoting for Oracle In order to to meet the 30-char limitation Oracle has on table names, and match the usual conventions for Oracle databases, Django may shorten table names and turn them all-uppercase. To prevent such transformations, use a quoted name as the value for db_table:

db_table = '"name_left_in_lowercase"'

Such quoted names can also be used with Django’s other supported database backends; except for Oracle, however, the quotes have no effect. See the Oracle notes for more details.

=========== 前面的斜体说加了引号可以阻止Oracle把表名切短和转成大写,后面的斜体又说对Oracle无效。。。。到底这个英文该如何翻译?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/544
 
4940 次点击  
文章 [ 5 ]  |  最新文章 9 年前
爱情的枪
Reply   •   1 楼
爱情的枪    9 年前

@cumt_ttr 差不多,类似这样

db_table = '"name_left_in_lowercase"'
cumt_ttr
Reply   •   2 楼
cumt_ttr    9 年前

@爱情的枪 加3引号? '''

爱情的枪
Reply   •   3 楼
爱情的枪    9 年前

@cumt_ttr 反正你在Django里 就用引号就对了。。。。不要纠结了。。

cumt_ttr
Reply   •   4 楼
cumt_ttr    9 年前

是不是说引号用在Oracle数据库里面无效,用在Django这里能起阻止转为大写和被截断的作用?

爱情的枪
Reply   •   5 楼
爱情的枪    9 年前

意思,应该是说 引号本身没有作用的意思。

就用加引号的作法呗