Coming Soon

The original ColdFusion ORM.

Turns this code for Microsoft SQL Server

<cfquery name="qry" datasource="#mydsn#" username="#dsusr#" password="#dspwd#">
   select * from [user] where [username] = <cfqueryparam value="#form.username#" cfsqltype="cf_sql_varchar" />
   and [password] = <cfqueryparam value="#form.password#" cfsqltype="cf_sql_varchar" />
</cfquery>

into this code for ANY database

<cfset stmt = ds.getStatement("select").init("user") />
<cfset qry = stmt.filter("username",form.username).filter("password",form.password).execute() />

or this

<cfset qry = ds.getSelect("*","user").collectionFilter(form).execute() />

or this

<cfset qry = ds.select(table="user",filters=form) />

Write less code, broaden your market and build applications faster.

DataFaucet: relax, have a drink. :)

Comments
gerald guido's Gravatar Isaac that is TIGHT. I love the filters and collectionFilter. I read your article on metadata on sys-con I did an experiment and your code using coldfusion.server.ServiceFactory worked on Railo 3... pretty cool huh...

Kirk OUT!!
# Posted By gerald guido | 6/15/08 12:15 AM
ike's Gravatar Hey thanks Gerald. :) I'm really surprised the servicefactory stuff works on Railo -- I wouldn't have bet money on that. :P Very cool tho. Sure would be real nice to be able to make DataFaucet work on all 3 platforms though, CF, Railo & OpenBD. Might have to extend the datamanager object to override some of those methods.
# Posted By ike | 6/15/08 2:16 AM
Terry Schmitt's Gravatar Now that's interesting about Railo. I've been bouncing between Reactor and Transfer for various reasons, but was always discouraged that Transfer won't work with Railo. I think it will be a definite plus if DataFaucet will work with all 3 CFML engines. I look forward to learning more about DataFaucet. I don't know how this will fit, but I'm looking for an ORM that can leverage the use of memcached.
# Posted By Terry Schmitt | 6/17/08 10:33 AM
ike's Gravatar Thanks Terry. Memcached isn't something I've found a need for personally and so of course it hasn't been implemented. I'm not opposed to implementing it but haven't had any plans. I do suspect that the query caching in DataFaucet is probably not working since the migration - a small bit of redevelopment for this project. I'm thinking about a cascading system for caching that would allow you to set a cache manager either in the individual SQL statement object, at the Datasource level or at the DataManager level (default). Imo the DataManager is the obvious place to put that because it would allow two or more separate applications running on the same server to share the same cache of a given query if they share a database. That's the way the metadata caching works right now for the same reason - two apps sharing a db don't have to be sync'ed if you add a column to a table and of course it uses less memory as well. But since you'll be able to set the cachemanager then if you wanted it to use Memcachd you could just write your own integration CFC and set it wherever you like.
# Posted By ike | 6/17/08 11:11 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.5.006.