Created
May 26, 2011 17:52
-
-
Save davejlong/993621 to your computer and use it in GitHub Desktop.
In-memory databases with Railo
This file contains hidden or 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
<cftry> | |
<cfquery name="create" datasource="inmemory"> | |
CREATE TABLE testTable ( | |
testID INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), | |
test VARCHAR(50) | |
) | |
</cfquery> | |
<cfcatch type="any"> | |
<!--- Well this sucks. Now our application can't do anything. ---> | |
</cfcatch> | |
</cftry> |
This file contains hidden or 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
<cfquery name="insert" datasource="inmemory"> | |
INSERT INTO testTable (test) | |
VALUES(<cfqueryparam value="foo" cfsqltype="cf_sql_varchar" />) | |
</cfquery> | |
<cfquery name="select" datasource="inmemory"> | |
SELECT * FROM testTable | |
</cfquery> | |
<cfdump var="#select#"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment