VARCHAR(255) または TEXT MySQL データ型を使用して科学記事の名前を保存したいと考えています。Squeryl は文字列を格納するために VARCHAR(128) フィールドを作成します。より大きなフィールドを使用するように構成するにはどうすればよいですか?
1 に答える
1
http://squeryl.org/schema-definition.htmlから
object Library extends Schema {
...
...
on(borrowals)(b => declare(
b.numberOfPhonecallsForNonReturn defaultsTo(0),
b.borrowerAccountId is(indexed),
columns(b.scheduledToReturnOn, b.borrowerAccountId) are(indexed)
))
on(authors)(s => declare(
s.email is(unique,indexed("idxEmailAddresses")), //indexes can be named explicitely
s.firstName is(indexed),
**s.lastName is(indexed, dbType("varchar(255)")),** // the default column type can be overriden
columns(s.firstName, s.lastName) are(indexed)
))
}
于 2012-03-07T19:16:34.367 に答える