summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-29 14:24:45 -0400
committerAdam <Adam@anope.org>2016-10-29 14:24:45 -0400
commitc06cc40d27e5cb83424d89cb19571eb42392abe6 (patch)
treebd8a0cec5210b7a0dcad7e46bb3070eebed53d11 /docs
parentfce6169f4e134a99dbb19997337b1bb250889147 (diff)
Add sqlite amalgamation and use if no system sqlite is found. Move sqlite module out of extras.
Diffstat (limited to 'docs')
-rw-r--r--docs/SQLite.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/SQLite.md b/docs/SQLite.md
index c23a88ef0..be25bbb27 100644
--- a/docs/SQLite.md
+++ b/docs/SQLite.md
@@ -1,6 +1,6 @@
# How to modify Anope sqlite databases
-Anope uses a custom SQLiite function (anope_canonicalize) for canonicalizing strings for case insensitive comparisons.
+Anope uses a custom SQLite function (anope_canonicalize) for canonicalizing strings for case insensitive comparisons.
It does this by using SQLites support for having indexes on expressions https://www.sqlite.org/expridx.html.
For example the account table could look like:
@@ -30,3 +30,14 @@ or libanope_sqlite_rfc1459.so into SQLite, depending on your casemap configurati
```
sqlite> .load lib/libanope_sqlite_ascii.so
```
+
+## Example of adding a new operator via SQLite
+
+```
+BEGIN TRANSACTION;
+-- Allocate new ID and insert into objects table
+INSERT INTO anope_db_objects (id, type) SELECT MAX(id + 1), 'oper' FROM anope_db_objects;
+-- Insert new operator using previously allocated id
+INSERT INTO anope_db_oper (name, type, require_oper, id) VALUES ('Adam', 'Services Root', 1, last_insert_rowid());
+COMMIT;
+```