Re: [DataMapper] Creating a new adapter

2012-08-08 Thread Greg
Sorry for the late reply, I didn't receive any notifications for some 
reason.

Thank you all for your suggestions. I will look into the three options 
posted above.

Regards
Greg

-- 
You received this message because you are subscribed to the Google Groups 
DataMapper group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/datamapper/-/nOZmBmBcNLoJ.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.



Re: [DataMapper] Creating a new adapter

2012-08-04 Thread Zhi-Qiang Lei
Actually, the document of the AbstractAdapter has told everything you need. 
Just implement #create, #update, #read, #delete methods. I have an adapter for 
Parse if it can help.

On Aug 3, 2012, at 8:11 PM, Greg wrote:

 Hi all
 
 I'm looking to create a new adapter for DataMapper. Is there a template that 
 I can use as a starting point, or a document that I can refer to that 
 explains the process?
 
 Thanks
 Greg
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 DataMapper group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/datamapper/-/0uQwrnm8URMJ.
 To post to this group, send email to datamapper@googlegroups.com.
 To unsubscribe from this group, send email to 
 datamapper+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/datamapper?hl=en.


Best regards,
Zhi-Qiang Lei
zhiqiang@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
DataMapper group.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.



Re: [DataMapper] Creating a new adapter

2012-08-03 Thread Markus Schirp

The best documentation are existing adapters.

An adapter that is easy to follow (IMHO) is the dm-mongo-adapter.

You can find it under https://github.com/solnic/dm-mongo-adapter.

The RDBMS adapters are a littlebit more complex to understand as they 
are implemented on the abstract dm-do-adpater. But when you whant to 
start an RDBMS adapter you should built it on top of dm-do-adpater.


Regards,

Markus

On 08/03/2012 02:11 PM, Greg wrote:

Hi all

I'm looking to create a new adapter for DataMapper. Is there a template
that I can use as a starting point, or a document that I can refer to
that explains the process?

Thanks
Greg

--
You received this message because you are subscribed to the Google
Groups DataMapper group.
To view this discussion on the web visit
https://groups.google.com/d/msg/datamapper/-/0uQwrnm8URMJ.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.


--
You received this message because you are subscribed to the Google Groups 
DataMapper group.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.



Re: [DataMapper] Creating a new adapter

2012-08-03 Thread Chris Corbyn
I'd actually use the InMemoryAdapter as a basis to work from.  It just keeps 
everything in core ruby data structures, so it's easy to follow and swap out 
the code with your own implementation.

https://github.com/datamapper/dm-core/blob/master/lib/dm-core/adapters/in_memory_adapter.rb

To see examples of doing query build etc, look at others, yep :)


Il giorno 03/ago/2012, alle ore 22:32, Markus Schirp ha scritto:

 The best documentation are existing adapters.
 
 An adapter that is easy to follow (IMHO) is the dm-mongo-adapter.
 
 You can find it under https://github.com/solnic/dm-mongo-adapter.
 
 The RDBMS adapters are a littlebit more complex to understand as they are 
 implemented on the abstract dm-do-adpater. But when you whant to start an 
 RDBMS adapter you should built it on top of dm-do-adpater.
 
 Regards,
 
 Markus
 
 On 08/03/2012 02:11 PM, Greg wrote:
 Hi all
 
 I'm looking to create a new adapter for DataMapper. Is there a template
 that I can use as a starting point, or a document that I can refer to
 that explains the process?
 
 Thanks
 Greg
 
 --
 You received this message because you are subscribed to the Google
 Groups DataMapper group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/datamapper/-/0uQwrnm8URMJ.
 To post to this group, send email to datamapper@googlegroups.com.
 To unsubscribe from this group, send email to
 datamapper+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/datamapper?hl=en.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 DataMapper group.
 To post to this group, send email to datamapper@googlegroups.com.
 To unsubscribe from this group, send email to 
 datamapper+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/datamapper?hl=en.
 

-- 
You received this message because you are subscribed to the Google Groups 
DataMapper group.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.



Re: [DataMapper] Creating a new adapter

2012-08-03 Thread Markus Schirp
Yeah this is a better idea as you can start pusing only small slices of 
functionallity to the real db doing the rest in memory.


Like when implementing veritas adapters.

On 08/03/2012 02:37 PM, Chris Corbyn wrote:

I'd actually use the InMemoryAdapter as a basis to work from.  It just
keeps everything in core ruby data structures, so it's easy to follow
and swap out the code with your own implementation.

https://github.com/datamapper/dm-core/blob/master/lib/dm-core/adapters/in_memory_adapter.rb

To see examples of doing query build etc, look at others, yep :)


Il giorno 03/ago/2012, alle ore 22:32, Markus Schirp ha scritto:


The best documentation are existing adapters.

An adapter that is easy to follow (IMHO) is the dm-mongo-adapter.

You can find it under https://github.com/solnic/dm-mongo-adapter.

The RDBMS adapters are a littlebit more complex to understand as they
are implemented on the abstract dm-do-adpater. But when you whant to
start an RDBMS adapter you should built it on top of dm-do-adpater.

Regards,

Markus

On 08/03/2012 02:11 PM, Greg wrote:

Hi all

I'm looking to create a new adapter for DataMapper. Is there a template
that I can use as a starting point, or a document that I can refer to
that explains the process?

Thanks
Greg

--
You received this message because you are subscribed to the Google
Groups DataMapper group.
To view this discussion on the web visit
https://groups.google.com/d/msg/datamapper/-/0uQwrnm8URMJ.
To post to this group, send email to datamapper@googlegroups.com
mailto:datamapper@googlegroups.com.
To unsubscribe from this group, send email to
datamapper+unsubscr...@googlegroups.com
mailto:datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.


--
You received this message because you are subscribed to the Google
Groups DataMapper group.
To post to this group, send email to datamapper@googlegroups.com
mailto:datamapper@googlegroups.com.
To unsubscribe from this group, send email to
datamapper+unsubscr...@googlegroups.com
mailto:datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.



--
You received this message because you are subscribed to the Google
Groups DataMapper group.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.


--
You received this message because you are subscribed to the Google Groups 
DataMapper group.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.