columns.vm

来自「一个数据访问层Torque3.1的生成器的源代码」· VM 代码 · 共 25 行

VM
25
字号
#foreach ($col in $table.Columns)    #set ( $type = $dbprops.get($col.Type) )    #set ( $size = $col.printSize() )    #if ( $type == "INTEGER" )        #set ( $size = "" )    #end    #set ( $rawsize = $col.Size )    #set ( $torquetype = $col.TorqueType )    #set ( $default = $col.DefaultSetting )    #if ($col.isAutoIncrement() && $table.IdMethod == "native")      #set ( $autoIncrement = $dbprops.get("AUTOINCREMENT") )    #else      #set ( $autoIncrement = " " )    #end        #set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") )    #if ( $torquetype == "BINARY" )        #set ( $entry = "$col.Name CHAR($rawsize) FOR BIT DATA $default $nullString $autoIncrement," )    #elseif ( $torquetype == "VARBINARY" )        #set ( $entry = "$col.Name VARCHAR($rawsize) FOR BIT DATA $default $nullString $autoIncrement," )    #else        #set ( $entry = "$col.Name $type $size $default $nullString $autoIncrement," )    #end    $strings.sub($strings.collapseSpaces($entry)," ,",",")#end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?