293
Chapter 11: Performing Server-Side Trickery
Method Description
cleanup() : Void Releases all data held in the neko.db.Manager class ??™ s
global cache.
initialize() : Void Prepares the neko.db.Manager class for use.
make( val : T ) : Void This method, which can be overridden, is called just
after class initialization.
unmake( val : T ) : Void This method, which can be overridden, is called just
before a data update.
select( sql : String ) : String Builds a SQL string with a passed condition string
construct appended to the end and also a FOR_UPDATE
command.
selectReadOnly( sql : String ) :
String
Builds a SQL string with a passed condition string
construct appended to the end.
As you can see, the functionality provided by the neko.db.Manager class is pretty extensive. All
manner of methods exist for retrieving and modifying data, whether returned in a SPOD - compatible
object or not. Given the previous example, you could quite easily rewrite the code to allow for multiple
records to be returned by using the all method, and then iterating through the contents of the returned
List:
import Author;
class AuthorApp
{
public static function main()
{
var dbloc = ???Wrox.
Pages:
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577