Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

XMLB list of DDL functions to create: Difference between revisions

From MoodleDocs
m (find_sequence_name() out in Moodle 2.0)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[XML database schema]] > [[XMLDB Roadmap|Roadmap]] >[[XMLDB Creating new DDL functions| Creating new DDL functions]] > List of DDL functions to create
[[XMLDB Documentation|XMLDB Documentation]] > [[XMLDB Roadmap|Roadmap]] >[[XMLDB Creating new DDL functions| Creating new DDL functions]] > List of DDL functions to create
----
----


Line 29: Line 29:
** <font color="green">Done: </font>add_key ($xmldb_table, $xmldb_key);
** <font color="green">Done: </font>add_key ($xmldb_table, $xmldb_key);
** <font color="green">Done: </font>drop_key ($xmldb_table, $xmldb_key);
** <font color="green">Done: </font>drop_key ($xmldb_table, $xmldb_key);
** <font color="green">Done: </font>rename_index ($xmldb_table, $xmldb_index, $newname); - <font color="red">note that MySQL, PostgreSQL and MSSQL don't support this</font>. Not important because keys shouldn't be accessed by name under XMLDB! This is just one experimental function! If you need to rename one key, just drop and re-create it.
** <font color="green">Done: </font>rename_key ($xmldb_table, $xmldb_key, $newname); - <font color="red">note that MySQL, PostgreSQL and MSSQL don't support this</font>. Not important because keys shouldn't be accessed by name under XMLDB! This is just one experimental function! If you need to rename one key, just drop and re-create it.
** <font color="green">Done: </font>find_key_name ($xmldb_table, $xmldb_key); - <font color="red">although it isn't using AdoDB MetaXXX at all (unsupported)</font>. Also, read [[Coding#Database structures|db coding]] for more info. This is just one experimental function!
** <font color="green">Done: </font>find_key_name ($xmldb_table, $xmldb_key); - <font color="red">although it isn't using AdoDB MetaXXX at all (unsupported)</font>. Also, read [[Database|db coding]] for more info. This is just one experimental function!
* '''Index functions'''
* '''Index functions'''
** <font color="green">Done: </font>add_index ($xmldb_table, $xmldb_index);
** <font color="green">Done: </font>add_index ($xmldb_table, $xmldb_index);
** <font color="green">Done: </font>drop_index ($xmldb_table, $xmldb-index);
** <font color="green">Done: </font>drop_index ($xmldb_table, $xmldb-index);
** <font color="green">Done: </font>rename_index ($xmldb_table, $xmldb_index, $newname); - <font color="red">note that MySQL doesn't support this</font>. Not important because indexes shouldn't be accessed by name under XMLDB! This is just one experimental function! If you need to rename one index, just drop and re-create it.
** <font color="green">Done: </font>rename_index ($xmldb_table, $xmldb_index, $newname); - <font color="red">note that MySQL doesn't support this</font>. Not important because indexes shouldn't be accessed by name under XMLDB! This is just one experimental function! If you need to rename one index, just drop and re-create it.
** <font color="green">Done: </font>index_exists ($xmldb_table, $xmldb_index);
** <font color="green">Done: </font>index_exists ($xmldb_table, $xmldb_index);
** <font color="green">Done: </font>find_index_name ($xmldb_table, $xmldb_index);
** <font color="green">Done: </font>find_index_name ($xmldb_table, $xmldb_index);
 
* '''Sequence functions''' (only of interest for oracle -insert_record -)
** <font color="green">Done: </font>find_sequence_name ($xmldb_table); '''Note:''' this is out in Moodle 2.0 (MDL-20349)


[[Category:XMLDB]]
[[Category:XMLDB]]

Latest revision as of 21:53, 11 October 2009

XMLDB Documentation > Roadmap > Creating new DDL functions > List of DDL functions to create


This page will be used to list and track the process of implementation of the new DDL functions available under Moodle 1.7.

This document can be outdated in the future, if new DDL functions arrive, and no efforts to keep it updated will be done. Its primary goal was to have the initial list and to track the work performed, by using the Done tag. Interim process can use the Work In Progress tag.

You always can view, in this link, the actual list of available DDL functions.

The initial list

  • Table functions
    • Done: create_table ($xmldb_table);
    • Done: drop_table ($xmldb_table);
    • Done: rename_table ($xmldb_table, $newname);
    • Done: table_exists ($xmldb_table);
  • Field functions
    • Done: add_field ($xmldb_table, $xmldb_field);
    • Done: drop_field ($xmldb_table, $xmldb_field);
    • Done: rename_field ($xmldb_table, $xmldb_field, $newname);
    • Done: change_field_type ($xmldb_table, $xmldb_field); (supports int<-->char, number<-->char, float<-->char)
    • Done: change_field_precision ($xmldb_table, $xmldb_field);
    • Done: change_field_unsigned ($xmldb_table, $xmldb_field);
    • Done: change_field_notnull ($xmldb_table, $xmldb_field);
    • Done: change_field_enum ($xmldb_table, $xmldb_field);
    • Done: change_field_default ($xmldb_table, $xmldb_field);
    • Done: field_exists ($xmldb_table, $xmldb_field);
  • Key functions
    • Done: add_key ($xmldb_table, $xmldb_key);
    • Done: drop_key ($xmldb_table, $xmldb_key);
    • Done: rename_key ($xmldb_table, $xmldb_key, $newname); - note that MySQL, PostgreSQL and MSSQL don't support this. Not important because keys shouldn't be accessed by name under XMLDB! This is just one experimental function! If you need to rename one key, just drop and re-create it.
    • Done: find_key_name ($xmldb_table, $xmldb_key); - although it isn't using AdoDB MetaXXX at all (unsupported). Also, read db coding for more info. This is just one experimental function!
  • Index functions
    • Done: add_index ($xmldb_table, $xmldb_index);
    • Done: drop_index ($xmldb_table, $xmldb-index);
    • Done: rename_index ($xmldb_table, $xmldb_index, $newname); - note that MySQL doesn't support this. Not important because indexes shouldn't be accessed by name under XMLDB! This is just one experimental function! If you need to rename one index, just drop and re-create it.
    • Done: index_exists ($xmldb_table, $xmldb_index);
    • Done: find_index_name ($xmldb_table, $xmldb_index);
  • Sequence functions (only of interest for oracle -insert_record -)
    • Done: find_sequence_name ($xmldb_table); Note: this is out in Moodle 2.0 (MDL-20349)