initial code from release 2.3.1
--HG-- extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%402
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
MsSQL XML Datatypes for WWW SQL Designer v 2.x
|
||||
Version: 0.1
|
||||
Author: schliden@gmail.com
|
||||
-->
|
||||
<datatypes db="mssql">
|
||||
<group label="Integer" color="rgb(238,238,170)">
|
||||
<type label="TinyInt" length="0" sql="tinyint" re="INT" quote="" bytes="1" note="Integer data: 0 to 255" />
|
||||
<type label="SmallInt" length="0" sql="smallint" re="INT" quote="" bytes="2" note="Integer data: -32,768 to 32,767" />
|
||||
<type label="Int" length="0" sql="int" re="INT" quote="" bytes="4" note="Integer data: -2,147,483,648 to 2,147,483,647" />
|
||||
<type label="BigInt" length="0" sql="bigint" re="INT" quote="" bytes="8" note="Integer data: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807" />
|
||||
</group>
|
||||
|
||||
<group label="Monetary" color="rgb(238,238,170)">
|
||||
<type label="Money" length="0" sql="money" re="FLOAT" quote="" bytes="8" note="Integer data: -922,337,203,685,477.5808 to 922,337,203,685,477.5807" />
|
||||
<type label="SmallMoney" length="0" sql="smallmoney" re="FLOAT" quote="" bytes="4" note="-214,748.3648 to 214,748.3647" />
|
||||
</group>
|
||||
|
||||
<group label="Numeric" color="rgb(238,238,170)">
|
||||
<type label="Real" length="0" sql="real" re="FLOAT" quote="" bytes="4" note="Floating precision number data: -3.402823E+38 to 3.402823E+38" />
|
||||
<type label="Float" length="0" sql="float" re="FLOAT" quote="" bytes="8" note="Floating precision number data: -4.94E+324 to 4.94E+324" />
|
||||
<type label="Decimal" length="1" sql="decimal" re="DEC" quote="" bytes="n*" note="Fixed precision and scale numeric data: -10^38 +1 to 10^38 -1 (decimal and numeric are synonyms)" />
|
||||
<type label="Numeric" length="1" sql="numeric" re="DEC" quote="" bytes="n*" note="Fixed precision and scale numeric data: -10^38 +1 to 10^38 -1 (decimal and numeric are synonyms)" />
|
||||
</group>
|
||||
|
||||
<group label="Character" color="rgb(255,200,200)">
|
||||
<type label="Char" length="0" sql="char" quote="'" bytes="n" note="Fixed-length character data with a maximum length of 8,000 characters" />
|
||||
<type label="Varchar" length="1" sql="varchar" quote="'" bytes="m <= n" note="Variable-length data with a maximum of 8,000 characters" />
|
||||
<type label="Text" length="1" sql="text" quote="'" bytes="<= 2,147,483,647" note="Variable-length data with a maximum length of 2,147,483,647 characters" />
|
||||
</group>
|
||||
|
||||
<group label="Unicode Character" color="rgb(255,200,200)">
|
||||
<type label="nChar" length="0" sql="nchar" quote="'" bytes="n" note="Fixed-length Unicode data with a maximum length of 4,000 characters" />
|
||||
<type label="nVarchar" length="1" sql="nvarchar" quote="'" bytes="m <= n" note="Variable-length Unicode data with a maximum length of 4,000 characters" />
|
||||
<type label="nText" length="1" sql="ntext" quote="'" bytes="<= 2,147,483,647" note="Variable-length Unicode data with a maximum length of 1,073,741,823 characters" />
|
||||
</group>
|
||||
|
||||
|
||||
<group label="Date & Time" color="rgb(200,255,200)">
|
||||
<type label="Datetime" length="0" sql="datetime" quote="" bytes="8" note="Jan 1, 1753 to Dec 31, 9999" />
|
||||
<type label="SmallDateTime" length="0" sql="smalldatetime" quote="" bytes="4" note="Jan 1, 1900 to Dec 31, 2079" />
|
||||
</group>
|
||||
|
||||
<group label="Binary" color="rgb(200,200,255)">
|
||||
<type label="Binary" length="0" sql="binary" quote="'" bytes="n" note="Fixed-length binary data with a maximum length of 8,000 bytes" />
|
||||
<type label="Varbinary" length="1" sql="varbinary" quote="'" bytes="m <= n" note="Variable-length binary data with a maximum length of 8,000 bytes" />
|
||||
</group>
|
||||
|
||||
<group label="Miscellaneous" color="rgb(200,220,255)">
|
||||
<type label="Bit" length="0" sql="bit" quote="" bytes="1" note="Boolean: 1 or 0" />
|
||||
<type label="Image" length="1" sql="image" re="BLOB" quote="" bytes="0 to 2,147,483,647" note="Variable-length binary data with a maximum length of 2,147,483,647 bytes" />
|
||||
<type label="Timestamp" length="0" sql="timestamp" quote="" bytes="8" note="Locally unique binary number updated as a row gets updated" />
|
||||
<type label="SQL Variant" length="1" sql="sql_variant" quote="" bytes="" note="Stores any datatype except text, ntext, image, timestamp" />
|
||||
<type label="Uniqueidentifier" length="1" sql="uniqueidentifier" quote="" bytes="16" note="GUID" />
|
||||
</group>
|
||||
</datatypes>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
XML 2 MsSQL XSL transformation for WWW SQL Designer v 2.x
|
||||
Version: 0.1
|
||||
Author: schliden@gmail.com
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="text"/>
|
||||
<xsl:template match="/sql">
|
||||
|
||||
<!-- tables -->
|
||||
<xsl:for-each select="table">
|
||||
<xsl:text>CREATE TABLE [</xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:text>] (
|
||||
</xsl:text>
|
||||
<xsl:for-each select="row">
|
||||
<xsl:text> [</xsl:text>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:text>] </xsl:text>
|
||||
|
||||
<xsl:value-of select="datatype" />
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<xsl:if test="@null = 0">
|
||||
<xsl:text>NOT NULL </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="@autoincrement = 1">
|
||||
<xsl:text>IDENTITY (1, 1) </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="not (position()=last())">
|
||||
<xsl:text>,</xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="comment">
|
||||
<xsl:text> -- </xsl:text><xsl:value-of select="comment" />
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="not (position()=last())">
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:text>
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
</xsl:text>
|
||||
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user