Refactoring Database Access in Marauroa: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Kymara
use syntax highlighting of java source code
imported>Kymara
 
(20 intermediate revisions by 2 users not shown)
Line 49: Line 49:
=== What are those database adapters for? ===
=== What are those database adapters for? ===


They are a thin layer of database abstraction. This allows us to not only support MySQL but also database systems with don't require an external server.
They are a thin layer of database abstraction. This allows us to not only support MySQL but also database systems which don't require an external server.



=== Why is there a method getLastInsertId? ===
=== Why is there a method getLastInsertId? ===
Line 83: Line 82:


The following diff shows the complete list of changes that were required to port JMaPacman. I think it may help you to get a feeling on how to adjust your own code.
The following diff shows the complete list of changes that were required to port JMaPacman. I think it may help you to get a feeling on how to adjust your own code.
<!--
Don't use syntax highlighting here because it does not work well with the diff characters and bold formation
<source lang="java">
<source lang="java">
-->
public class MaPacmanRPRuleProcessor implements IRPRuleProcessor
public class MaPacmanRPRuleProcessor implements IRPRuleProcessor
{
{
Line 165: Line 167:
}
}
}
}

</source>

[[Category:Marauroa]]