Commit Graph

44 Commits

Author SHA1 Message Date
Jonathan Guthrie 07dc131e51 update for s4p3 2017-09-29 15:00:18 -04:00
Jonathan Guthrie 808c8ee58f Add more refinement to extract, and start tests 2017-08-22 11:34:52 -04:00
Jonathan Guthrie 089490f65f Merge pull request #4 from iamcam/feature/schema
Extract Map type fixes
2017-08-19 00:24:20 -04:00
Cameron Perry a0da96991b Fixed def type and return type for consistency with other extract methods 2017-08-18 21:07:17 -07:00
Jonathan Guthrie 971740a9ed adding a lot more functions to extract class 2017-08-18 16:17:48 -04:00
Jonathan Guthrie 79a29e8381 adding moment 2017-08-18 16:17:31 -04:00
Jonathan Guthrie b3925b6bf5 catchup to master 2017-08-18 15:31:49 -04:00
Jonathan Guthrie 2dcb2e5d3a Initial commit of schema modelling 2017-08-18 15:28:39 -04:00
Jonathan Guthrie 7b755fcb93 Starting the extract data helpers 2017-08-18 15:28:21 -04:00
Jonathan Guthrie 45bb5ad7ab Adding connection error state 2017-08-17 13:28:12 -04:00
Jonathan Guthrie f2f54fe2ef remove pins 2017-08-10 12:57:02 -04:00
Jonathan Guthrie dac972a3ba Merge pull request #1 from thislooksfun/patch-2
Add modifyValue(_:,forKey:)
2017-08-10 12:54:04 -04:00
thislooksfun 6d27a7b86a Add modifyValue(_:,forKey:)
This adds and implements `open func modifyValue(_ v: Any?, forKey k: String) -> Any` to the `StORM` class.
The intent of this addition is to allow base classes to optionally change the data sent to the database. For example, I am using it to properly handle `Optional`s and the `Date` class in PostgreSQL as follows:
```swift
override func modifyValue(_ val: Any, forKey k: String) -> Any {
	var v = val
	if let o = val as? OptionalProtocol {
		if o.isSome() {
			v = o.unwrap() // not-nil
		} else {
			return ""  // nil
		}
	}
	// After this point, v is guarenteed to not be optional or nil
	
	if let d = v as? Date {
		return d.timestamptz
	}
	
	return v
}
```
The implementations of `OptionalProtocol` and `timestamptz` are irrelevant for this pr.

The `forKey` parameter is there in case someone wants to switch based on name, not on value.

The name is just a placeholder, so feel free to change it if you think of something better.
2017-08-10 00:48:39 -05:00
Jonathan Guthrie dde705a0a9 Adding support for storing [String] as comma delimited strings 2017-04-06 16:26:40 -04:00
Jonathan Guthrie 10e1a8a561 update to use major version only 2017-03-28 11:05:59 -04:00
Jonathan Guthrie f6de4838c8 open->public; update for linux builds 2016-12-08 11:29:26 -05:00
Jonathan Guthrie 2a3e52b7a5 Doc Comments! 2016-12-07 15:16:02 -05:00
Jonathan Guthrie a2e274276b Add asDataDict, add filter for varnames with _ 2016-12-02 18:54:40 -05:00
Jonathan Guthrie b5a7dda2ea adding support for json encoded objects 2016-11-11 14:49:05 -05:00
Jonathan Guthrie b836d0362c adding MySQL specific hooks 2016-10-22 16:44:05 -04:00
Jonathan Guthrie f711b873f8 adding var StORMdebug 2016-10-20 10:14:58 -04:00
Jonathan Guthrie 54d3e15efb add internal_ column exclusion 2016-10-18 10:20:27 -04:00
Jonathan Guthrie 23081102ae adding public string function 2016-10-06 14:22:30 -04:00
Jonathan Guthrie 9a6836f8aa adding noRecordFound 2016-10-06 12:07:09 -04:00
Jonathan Guthrie 11a283d2bc trimming unneeded imports of modules 2016-10-06 11:23:07 -04:00
Jonathan Guthrie 500c302c05 add keyIsEmpty, create, asData, change cols to return array not dict
add not implemented to error
2016-10-06 10:19:16 -04:00
Jonathan Guthrie 605657d2b5 adding makeRow to the protocol 2016-10-05 15:15:50 -04:00
Jonathan Guthrie 85ce18623f StORMError is now actually an Error object 2016-10-05 15:15:35 -04:00
Jonathan Guthrie 29c4a71dc3 add errorMsg property 2016-10-05 15:15:07 -04:00
Jonathan Guthrie 011c754089 adding StORMProtocol 2016-10-05 10:31:48 -04:00
Jonathan Guthrie fe8ea100a7 remove table, open resultCode 2016-10-05 10:31:33 -04:00
Jonathan Guthrie 0e7288c2ba adding start of introspection 2016-10-05 10:31:08 -04:00
Jonathan Guthrie 2a0cc5e27b updating naming so it's consistent 2016-09-30 16:47:58 -04:00
Jonathan Guthrie ccc06cfee3 renaming 2016-09-30 16:02:44 -04:00
Jonathan Guthrie 8ede7a64b8 catchup commit 2016-09-30 15:45:55 -04:00
Jonathan Guthrie 7bdc9635b2 add error stub 2016-09-30 15:45:13 -04:00
Jonathan Guthrie 5fac1dcac0 flesh out cursor, add inits, totalRecords 2016-09-25 00:18:32 -04:00
Jonathan Guthrie 9b03d8b28c adding joins struct 2016-09-25 00:18:06 -04:00
Jonathan Guthrie 9df8cb8623 making reds vars public 2016-09-24 23:49:34 -04:00
Jonathan Guthrie a9bb2d4e0f change from default pg to unknown 2016-09-24 23:49:16 -04:00
Jonathan Guthrie c466c5cd25 adding protocol 2016-09-24 23:49:01 -04:00
Jonathan Guthrie 7be8c3b918 next iteration 2016-09-24 00:29:56 -04:00
Jonathan Guthrie da4f83a067 tests 2016-09-23 16:24:11 -04:00
Jonathan Guthrie 7f41645612 staging commit 2016-09-23 15:16:47 -04:00