Noah Metz
5703b047a8
Added additional string to configure update/delete actions
2024-01-25 22:38:32 -07:00
Noah Metz
15eaabebc8
Added foreign_key table constraint
2024-01-25 22:20:50 -07:00
Alexey Romanov
cbc3505f7a
Use binary:replace instead of re:replace to handle Latin-1 binaries
...
Fixes #43
2015-12-21 15:21:02 +03:00
Alexey Romanov
47ef78b5ed
Formatting
2014-10-13 09:53:14 +04:00
Alexey Romanov
d125bcba07
Allow raw constraints for tables as well
2014-10-10 10:35:31 +04:00
Alexey Romanov
9b9448dcdd
Merge remote-tracking branch 'stentroad/custom'
2014-10-10 10:28:39 +04:00
Max Lapshin
3e306069c8
support for encoding true/false to sqlite
2013-08-15 17:26:57 +04:00
Max Lapshin
483063e9b2
Added add_columns_sql
...
Need to add columns to table.
2013-08-10 16:58:14 +04:00
Ryan Flynn
9a28ba1651
correct 'Other' double-use
2013-03-23 11:31:58 -04:00
Brian Stubbs
eab6ce1fcc
Allow raw sql in create_table (used for foreign keys).
2012-11-07 12:05:13 -02:00
Alexey Romanov
8f65e13669
Removed redundant @spec tags
2012-02-24 17:26:32 +04:00
Alexey Romanov
fe5fd4c7f5
Removed unneeded abbreviation
2012-02-24 17:16:07 +04:00
Alexey Romanov
0611b80884
Fixed tests, added support for non-atom column ids
2012-02-24 17:13:02 +04:00
Ulf Wiger
bfbf038873
list_tables/1 now returns table names as they were first given.
...
The create_table/3 function will cast all table names to binaries, allowing
them to be given as atoms, binaries or strings. In order to recall what the
original type was, the CREATE TABLE statement includes a constant CHECK
constraint, e.g. CHECK('bin'='bin'), which is then parsed by the list_tables
function. The constraint is put last in the statement, and should not
interfere with any other constraints. Hopefully, the sqlite compiler is good
enough that this constant expression doesn't add too much overhead. :)
2012-02-24 09:11:24 +01:00
Ulf Wiger
6986d0bbde
Changed the type of table names to include binaries and strings.
...
Table names get converted into iolists anyway, and in some applications,
it is undesireable to have to create atoms for dynamic table names.
2012-02-22 20:44:07 +01:00
Alexey Romanov
13cb7f8148
Types improved
2011-04-28 13:20:44 +04:00
Alexey Romanov
766ba3f682
Fixed types
2011-04-28 12:50:06 +04:00
Alexey Romanov
49dc2e9439
Support single constraints without lists
2011-04-28 10:21:54 +04:00
Alexey Romanov
13e4e62140
Fixed a bug with multiple primary key subconstraints
2011-04-28 10:07:08 +04:00
Alexey Romanov
747d13d85a
Formatting fixed
2011-04-28 10:03:23 +04:00
Alexey Romanov
4d3e911f19
Primary key may be asc as well
2011-04-28 10:02:51 +04:00
Alexey Romanov
14b542ab61
Tests for autoincrement and desc primary key added
2011-04-28 10:00:19 +04:00
Alexey Romanov
fa18fa678e
Typo fixed
2011-04-28 09:55:46 +04:00
Alexey Romanov
8401f62db5
Formatting fixed
2011-04-28 09:55:32 +04:00
sergey-miryanov
e3c9243d1a
Add AUTOINCREMENT to primary keys
2011-04-28 08:43:56 +06:00
Alexey Romanov
fd7d937948
Fix dumb error
2011-03-21 12:20:09 +03:00
Alexey Romanov
1688f763f0
Treat atom 'undefined' as null
2011-03-21 11:22:34 +03:00
Alexey Romanov
6b9523d7d3
Support UTF-8 text
2011-03-11 18:16:03 +03:00
Alexey Romanov
b677cb45e8
Support OTP R13B.
...
Remove use of R13B04 features.
2011-02-16 18:54:04 +03:00
Alexey Romanov
a6fa7aef21
Formatting
2010-12-06 19:19:26 +03:00
Alexey Romanov
2059bfd7fd
Support for BLOBs
2010-10-28 10:14:04 +04:00
Alexey Romanov
93e4e74461
Indentation fixed
2010-10-22 12:07:24 +04:00
Alexey Romanov
8ae641e4e5
Changed external calls to the same module to local calls
2010-10-22 10:32:03 +04:00
Alexey Romanov
3bfd35418c
Slight change in test
2010-10-22 10:02:00 +04:00
Alexey Romanov
9c28f38027
Fix handling of default values
2010-10-15 12:52:49 +04:00
Alexey Romanov
42bffde039
More tests
2010-10-12 17:20:30 +04:00
Alexey Romanov
972df93fbb
Added EUnit tests
2010-10-12 16:42:57 +04:00
Alexey Romanov
a8d0290407
Functions to create tables with constraints
2010-10-12 14:23:05 +04:00
Alexey Romanov
2b4afbe1b6
Continued support for constraints
2010-10-12 13:48:58 +04:00
Alexey Romanov
e8e6470172
Begin support for other constraints than PRIMARY KEY
2010-10-12 12:42:39 +04:00
Alexey Romanov
7629e1f38c
Moved documentation for sql_value() type to correct place
2010-10-12 11:42:23 +04:00
Alexey Romanov
f6b0b2185f
More specific type for map_intersperse
2010-10-12 10:49:10 +04:00
Alexey Romanov
37aa64dd5f
Replace return type string() with iolist() for SQL-generating functions
2010-10-12 10:14:51 +04:00
Alexey Romanov
cb2f1c9121
Formatting fixed
2010-10-12 10:08:52 +04:00
Alexey Romanov
0669e26175
Fixed column types, according to http://www.sqlite.org/datatype3.html
2010-10-12 09:57:14 +04:00
Alexey Romanov
5f5532bbe8
Replaced use of intersperse with map_intersperse
2010-10-12 09:44:10 +04:00
Alexey Romanov
70a42cab2c
Removed remaining io:format calls when constructing queries
2010-10-07 14:22:29 +04:00
Alexey Romanov
f20f951c7c
Simplified replace function (see Erlang Efficiency Guide)
2010-10-05 14:32:08 +04:00
Alexey Romanov
842df283d0
Construct SQL queries as iolists, not as strings
2010-10-05 14:27:28 +04:00
sergey-miryanov
092f6934e3
Fix typo
...
Replace null atom with string. Thanks to Jacek Złydach
2010-07-14 14:08:16 +06:00