project:submitting
Differences
This shows you the differences between two versions of the page.
project:submitting [2019/11/26 19:32] – created mnewnham | project:submitting [2019/11/26 23:32] (current) – [Scenarios] mnewnham | ||
---|---|---|---|
Line 20: | Line 20: | ||
These are often the most contentious discussions because we're likely to ask you to show how the behavior is wrong **in general**, and not just in your particular use case. In addition, if there is a problem, we need to be able to ensure that users who have relied on the apparently faulty behavior (possibly for years) aren't going to have problems if they upgrade to a version of ADOdb that has corrected behavior. That might mean, in the short term, an optional, parameterized change. Remember, ADOdb isn't an obscure little side project, there are normally 100-200 downloads per week, continually over a period of nearly 20 years. | These are often the most contentious discussions because we're likely to ask you to show how the behavior is wrong **in general**, and not just in your particular use case. In addition, if there is a problem, we need to be able to ensure that users who have relied on the apparently faulty behavior (possibly for years) aren't going to have problems if they upgrade to a version of ADOdb that has corrected behavior. That might mean, in the short term, an optional, parameterized change. Remember, ADOdb isn't an obscure little side project, there are normally 100-200 downloads per week, continually over a period of nearly 20 years. | ||
=== You want to enhance the functionality of a specific function === | === You want to enhance the functionality of a specific function === | ||
- | Say, for example, you wanted to add the ability of the **mysqli** connector to use | + | Say, for example, you wanted to add the ability of the **mysqli** connector to use SSL connections to connect to the database. |
+ | - Start first by seeing how you can use the existing methods to provide access into your new codes. Don't, for example, modify the format of the **connect** function to require new, or modified parameters. | ||
+ | - You might, for example, use the **setConnectionParameter** method to inject the SSL parameters into the connection. | ||
+ | - If you need to add new class variables or methods, make sure the connection doesn' | ||
+ | - Make sure that your feature doesn' | ||
+ | === Adding A New Feature === | ||
+ | You might decide to offer a new method // | ||
+ | <code sql> | ||
+ | SELECT DATE_FORMAT(field,' | ||
+ | </ | ||
+ | You would then add the code into the drivers/ | ||
+ | <code php> | ||
+ | /** | ||
+ | * Formats the date into year only format YYYY | ||
+ | * | ||
+ | * @param str $field The name of the date to format | ||
+ | * | ||
+ | * @return str The SQL text | ||
+ | */ | ||
+ | public function year($fld) | ||
+ | { | ||
+ | $x = " | ||
+ | return $x; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | In order to fulfill the requirement for cross database compatibility, | ||
+ | |||
+ | <code sql> | ||
+ | SELECT YEAR(field) // | ||
+ | SELECT TO_CHAR(field,' | ||
+ | </ | ||
+ | |||
+ | Even if you cannot test these yourself because you have no access to the database, you can code them into your branch and put out a call on the issues page for help testing. | ||
+ | |||
+ | You need also to create some end user documentation, | ||
project/submitting.1574793123.txt.gz · Last modified: 2019/11/26 19:32 by mnewnham