Created
October 26, 2015 14:20
-
-
Save ryanguill/56470acb9315a2584ffa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="translateCfSqlType" access="public" returntype="string" output="false"> | |
<cfargument name="typeName" type="string" required="true" /> | |
<cfswitch expression="#arguments.typeName#"> | |
<cfcase value="bigint,int8,serial8"> | |
<cfreturn "cf_sql_bigint" /> | |
</cfcase> | |
<cfcase value="bigint identity"> | |
<cfreturn "cf_sql_bigint" /> | |
</cfcase> | |
<cfcase value="binary"> | |
<cfreturn "cf_sql_binary" /> | |
</cfcase> | |
<cfcase value="bit,bool,boolean"> | |
<cfreturn "cf_sql_bit" /> | |
</cfcase> | |
<cfcase value="char"> | |
<cfreturn "cf_sql_char" /> | |
</cfcase> | |
<cfcase value="datetime,timestamp without time zone"> | |
<cfreturn "cf_sql_timestamp" /> | |
</cfcase> | |
<cfcase value="date"> | |
<cfreturn "cf_sql_date" /> | |
</cfcase> | |
<cfcase value="time"> | |
<cfreturn "cf_sql_time" /> | |
</cfcase> | |
<cfcase value="decimal"> | |
<cfreturn "cf_sql_float" /> | |
</cfcase> | |
<cfcase value="double"> | |
<cfreturn "cf_sql_numeric" /> | |
</cfcase> | |
<cfcase value="float"> | |
<cfreturn "cf_sql_float" /> | |
</cfcase> | |
<cfcase value="image"> | |
<cfreturn "cf_sql_longvarbinary" /> | |
</cfcase> | |
<cfcase value="int,int unsigned,int identity,int4,serial,serial4,integer"> | |
<cfreturn "cf_sql_integer" /> | |
</cfcase> | |
<cfcase value="money"> | |
<cfreturn "cf_sql_money" /> | |
</cfcase> | |
<cfcase value="nchar,bpchar"> | |
<cfreturn "cf_sql_char" /> | |
</cfcase> | |
<cfcase value="ntext"> | |
<cfreturn "cf_sql_longvarchar" /> | |
</cfcase> | |
<cfcase value="numeric"> | |
<cfreturn "cf_sql_float" /> | |
</cfcase> | |
<cfcase value="nvarchar"> | |
<cfreturn "cf_sql_varchar" /> | |
</cfcase> | |
<cfcase value="longtext"> | |
<cfreturn "cf_sql_longvarchar" /> | |
</cfcase> | |
<cfcase value="real"> | |
<cfreturn "cf_sql_real" /> | |
</cfcase> | |
<cfcase value="smalldatetime"> | |
<cfreturn "cf_sql_date" /> | |
</cfcase> | |
<cfcase value="smallint"> | |
<cfreturn "cf_sql_smallint" /> | |
</cfcase> | |
<cfcase value="smallmoney"> | |
<cfreturn "cf_sql_decimal" /> | |
</cfcase> | |
<cfcase value="text"> | |
<cfreturn "cf_sql_longvarchar" /> | |
</cfcase> | |
<cfcase value="timestamp"> | |
<cfreturn "cf_sql_timestamp" /> | |
</cfcase> | |
<cfcase value="tinyint"> | |
<cfreturn "cf_sql_tinyint" /> | |
</cfcase> | |
<cfcase value="uniqueidentifier"> | |
<cfreturn "cf_sql_idstamp" /> | |
</cfcase> | |
<cfcase value="varbinary"> | |
<cfreturn "cf_sql_varbinary" /> | |
</cfcase> | |
<cfcase value="varchar,character varying"> | |
<cfreturn "cf_sql_varchar" /> | |
</cfcase> | |
</cfswitch> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment