Gwendal Roué
52b13da2b3
DatabaseTableMapping.databaseTableName() now returns a non-optional String
2015-12-10 13:23:45 +01:00
Gwendal Roué
4e183439b5
DatabasePersistable.didInsertWithRowID(_:forColumn:) is called even when there is no INTEGER PRIMARY KEY column. DatabaseTableMapping no longer extends RowConvertible. ( #12 )
2015-12-10 09:06:00 +01:00
Gwendal Roué
c4fa174fad
DatabasePersistable documentation ( #12 )
2015-12-10 08:14:36 +01:00
Gwendal Roué
cc59f62420
Refactor DatabasePersistable so that all CRUD methods are dynamically dispatched. The protocol exposes default implementation for CRUD methods as statically dispatched method that are available for adopting types in their own implementations of CRUD methods. Introduce DatabasePersistable.save() ( #12 )
2015-12-10 08:09:36 +01:00
Gwendal Roué
22dd8e1c3a
Introduce DatabasePersistable that grants CRUD methods to any type
2015-12-09 08:53:08 +01:00
Gwendal Roué
bf48bd6ac2
Remove a bunch of self.
2015-12-01 09:07:55 +01:00
Gwendal Roué
32b9971cfa
minor
2015-11-17 08:28:25 +01:00
Gwendal Roué
1e3d9f16df
StatementArguments.Default is used in place of nil for default parameter values.
2015-11-13 11:46:25 +01:00
Gwendal Roué
76548ad6a9
Record.insert, update and save return Void again. Record.delete returns a Bool.
2015-11-04 07:44:55 +01:00
Gwendal Roué
9f444293eb
Record.insert, update, save and delete return a DatabaseChanges object.
2015-11-02 19:55:39 +01:00
Gwendal Roué
18306fcd64
Use /// for documentation comments, since Xcode 7 has weird behavior with /**
2015-10-27 08:30:24 +01:00
Gwendal Roué
a24c9111f8
Document Record.insert() about automatic ids
2015-10-15 13:11:59 +02:00
Gwendal Roué
1785fd83ce
Record.reload() is no longer a final method.
2015-10-15 13:11:37 +02:00
Gwendal Roué
d0e5c8b115
Record.update(_) always execute an UPDATE statement
...
Even if there is no column to update, for tables made of a single primary key column. The goal is to make sure that TransitionObserverType can observe all updates, event updates from minimal tables.
2015-09-29 18:36:14 +02:00
Gwendal Roué
d32343e027
Fix typo
2015-09-29 08:23:44 +02:00
Gwendal Roué
af1702a973
Fix typo
2015-09-29 08:22:38 +02:00
Gwendal Roué
6a62ed6a53
@warn_unused_result Record.copy()
2015-09-26 11:56:17 +02:00
Gwendal Roué
537d9dd087
Record documentation
2015-09-24 08:50:19 +02:00
Gwendal Roué
3ec12b0f9b
Metal documentation WIP
2015-09-23 04:56:43 +02:00
Gwendal Roué
49c9636086
Make Row a class, and introduce DatabaseSequence and DatabaseGenerator for better performance.
2015-09-22 22:37:53 +02:00
Gwendal Roué
8b46d27377
Remove metalFetch() functions, and make Row.fetch() unsafe. RowConvertible builds from metal rows. Add Row.detachedRow(). Record stores a detached row as a reference row.
2015-09-22 08:33:17 +02:00
Gwendal Roué
75bb735e98
Use fatalError() instead of precondition() so that safety checks survive Release configuration.
2015-09-12 14:36:06 +02:00
Gwendal Roué
4cbac39dfc
Use precondition() instead of assert() so that safety checks survive Release configuration.
2015-09-12 14:24:21 +02:00
Gwendal Roué
214c9d30cd
Database.updateStatement() is no longer a throwing method.
2015-09-11 18:33:58 +02:00
Gwendal Roué
8173b31df9
Record documentation explicitly warns against mangled column names.
2015-09-11 13:25:16 +02:00
Gwendal Roué
319fe3c643
Failing tests for Record loaded from mangled column names.
2015-09-11 10:26:44 +02:00
Gwendal Roué
4f07acd0a0
Record.awakeFromFetch()
2015-09-10 22:01:59 +02:00
Gwendal Roué
085ec7f1c0
Record.databaseChanges WIP
2015-09-09 19:01:10 +02:00
Gwendal Roué
d74b3dd3bc
Record.databaseChanges WIP
2015-09-09 18:07:00 +02:00
Gwendal Roué
079801d99f
Record.copy() replaces Record.copyDatabaseValuesFrom()
2015-09-09 13:54:43 +02:00
Gwendal Roué
4da1d3aec9
DataMapper cleanup
2015-09-09 13:39:23 +02:00
Gwendal Roué
6239955e08
Replace fatalError() with assert() when possible
2015-09-09 13:26:57 +02:00
Gwendal Roué
5906469826
Rename RowModel to Record
2015-09-09 09:56:28 +02:00