Kyle Jessup
fe48e5f421
Updated package file and removed dep
2019-03-26 12:20:00 -04:00
Jonathan Guthrie
653f4bdfa6
refine to assist with decimals too
2018-04-19 14:55:32 -04:00
Jonathan Guthrie
fea3e9c026
Extend to cope with double + float
2018-04-19 13:55:59 -04:00
Jonathan Guthrie
8e6777dc4e
Fix for MySQL double formatting. It comes back as a float
2018-04-19 11:45:59 -04:00
Jonathan Guthrie
8b0578ef36
Adding required info for DSN/Socket
2018-03-02 11:17:01 -05:00
Jonathan Guthrie
aa28a85065
Fix missing string
2018-03-02 11:16:03 -05:00
Jonathan Guthrie
b5f3038f01
Adding StORM.Extract class
2018-03-02 10:54:15 -05:00
TheSantaClaus
027706cf8d
Make asData and asDataDict functions open
2017-11-01 18:35:11 +02:00
Ryan Coyne
d86a081335
Merge remote-tracking branch 'upstream/master'
2017-08-30 13:23:11 -04:00
Jonathan Guthrie
45bb5ad7ab
Adding connection error state
2017-08-17 13:28:12 -04:00
Ryan Coyne
a9a532ddc6
Removed out the old commented code
2017-08-15 09:15:11 -04:00
Ryan Coyne
4ee391dcd5
Modifying print statement for an unexpected type for primary keys
2017-08-13 14:56:21 -04:00
Ryan Coyne
1cbb94d729
Adding in the changes to consider optionals when checking if the keyIsEmpty
2017-08-13 14:51:52 -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
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